SDL: Apply shutdown race condition fix.

This commit is contained in:
Unknown W. Brackets committed 2018-02-10 16:55:50 -08:00
1 parent 48b4a5f378
commit a85a88e112
4 files changed
+12

No files matched your search

+1
View File
@@ -208,6 +208,7 @@ void MainUI::EmuThreadFunc() {
emuThreadState = (int)EmuThreadState::STOPPED;
NativeShutdownGraphics();
graphicsContext->StopThread();
}
void MainUI::EmuThreadStart() {
+5
View File
@@ -82,6 +82,11 @@ public:
renderManager_->ThreadEnd();
}
void StopThread() override {
renderManager_->WaitUntilQueueIdle();
renderManager_->StopThread();
}
private:
Draw::DrawContext *draw_ = nullptr;
GLRenderManager *renderManager_ = nullptr;
+5
View File
@@ -38,6 +38,11 @@ public:
renderManager_->ThreadEnd();
}
void StopThread() override {
renderManager_->WaitUntilQueueIdle();
renderManager_->StopThread();
}
private:
Draw::DrawContext *draw_ = nullptr;
SDL_Window *window_;
+1
View File
@@ -423,6 +423,7 @@ static void EmuThreadFunc(GraphicsContext *graphicsContext) {
emuThreadState = (int)EmuThreadState::STOPPED;
NativeShutdownGraphics();
graphicsContext->StopThread();
}
static void EmuThreadStart(GraphicsContext *context) {