Move calling ThreadStart and ThreadEnd into the EmuThread wrapper

This commit is contained in:
Henrik Rydgård committed 2026-07-26 11:54:50 +02:00
1 parent ea3a2a2e84
commit 29edec7684
4 files changed
+22 -27

No files matched your search

+2
View File
@@ -80,6 +80,7 @@ std::thread EmuThread_Start(GraphicsContext *graphicsContext, Application *appli
_dbg_assert_(g_emuThreadState == EmuThreadState::STOPPED);
g_emuThreadState = EmuThreadState::RUNNING;
std::thread emuThread = std::thread(&EmuThreadFunc, graphicsContext, application, postFrame);
graphicsContext->ThreadStart();
return emuThread;
}
@@ -96,6 +97,7 @@ void EmuThread_Join(GraphicsContext *graphicsContext, std::thread &emuThread) {
return g_emuThreadState == EmuThreadState::STOPPED;
});
}
graphicsContext->ThreadEnd();
emuThread.join();
emuThread = std::thread();
}