Init parallelrdp on EmuThread thread (so that the console doesnt get spammed with error logs)

This commit is contained in:
Simone
2024-05-14 15:31:47 +02:00
parent 83fc2b583c
commit e61dc1bfc4
4 changed files with 8 additions and 9 deletions

View File

@@ -4,9 +4,11 @@
#include "Audio.hpp"
EmuThread::EmuThread(std::unique_ptr<QtInstanceFactory>&& instance_, std::unique_ptr<Vulkan::WSIPlatform>&& wsiPlatform_, std::unique_ptr<ParallelRDP::WindowInfo>&& windowInfo_, QObject* parent_object) noexcept
: QThread(parent_object), instance(std::move(instance_)), wsiPlatform(std::move(wsiPlatform_)), windowInfo(std::move(windowInfo_)), parallel(instance.get(), std::move(wsiPlatform), std::move(windowInfo)) {}
: QThread(parent_object), instance(std::move(instance_)), wsiPlatform(std::move(wsiPlatform_)), windowInfo(std::move(windowInfo_)) {}
[[noreturn]] void EmuThread::run() noexcept {
parallel.Init(instance.get(), std::move(wsiPlatform), std::move(windowInfo), core->cpu->GetMem().GetRDRAMPtr());
while (true) {
if (!core->pause) {
core->Run(settings->getVolumeL(), settings->getVolumeR());

View File

@@ -15,7 +15,6 @@ KaizenQt::KaizenQt() noexcept : QWidget(nullptr) {
std::move(mainWindow->view.vulkanWidget->windowInfo),
mainWindow);
emuThread->core = new n64::Core(emuThread->parallel);
emuThread->parallel.Init(emuThread->core->cpu->GetMem().GetRDRAMPtr());
ConnectMainWindowSignalsToSlots();