mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-11 08:39:28 +01:00
Move calling ThreadStart and ThreadEnd into the EmuThread wrapper
This commit is contained in:
1 parent
ea3a2a2e84
commit
29edec7684
4 files changed
+22
-27
No files matched your search
@@ -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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user