mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
SDL: Apply shutdown race condition fix.
This commit is contained in:
1 parent
48b4a5f378
commit
a85a88e112
4 files changed
+12
No files matched your search
@@ -208,6 +208,7 @@ void MainUI::EmuThreadFunc() {
|
||||
emuThreadState = (int)EmuThreadState::STOPPED;
|
||||
|
||||
NativeShutdownGraphics();
|
||||
graphicsContext->StopThread();
|
||||
}
|
||||
|
||||
void MainUI::EmuThreadStart() {
|
||||
|
||||
@@ -82,6 +82,11 @@ public:
|
||||
renderManager_->ThreadEnd();
|
||||
}
|
||||
|
||||
void StopThread() override {
|
||||
renderManager_->WaitUntilQueueIdle();
|
||||
renderManager_->StopThread();
|
||||
}
|
||||
|
||||
private:
|
||||
Draw::DrawContext *draw_ = nullptr;
|
||||
GLRenderManager *renderManager_ = nullptr;
|
||||
|
||||
@@ -38,6 +38,11 @@ public:
|
||||
renderManager_->ThreadEnd();
|
||||
}
|
||||
|
||||
void StopThread() override {
|
||||
renderManager_->WaitUntilQueueIdle();
|
||||
renderManager_->StopThread();
|
||||
}
|
||||
|
||||
private:
|
||||
Draw::DrawContext *draw_ = nullptr;
|
||||
SDL_Window *window_;
|
||||
|
||||
@@ -423,6 +423,7 @@ static void EmuThreadFunc(GraphicsContext *graphicsContext) {
|
||||
emuThreadState = (int)EmuThreadState::STOPPED;
|
||||
|
||||
NativeShutdownGraphics();
|
||||
graphicsContext->StopThread();
|
||||
}
|
||||
|
||||
static void EmuThreadStart(GraphicsContext *context) {
|
||||
|
||||
Reference in new issue
Block a user