Make OpenGL render thread shutdown more robust.

This commit is contained in:
Henrik Rydgård committed 2026-08-04 16:44:55 +02:00
1 parent 092ec2f391
commit be922eca62
20 files changed
+169 -178

No files matched your search

+7 -2
View File
@@ -485,10 +485,15 @@ void WindowsGLContext::ThreadStart() {
renderManager_->ThreadStart(draw_);
}
bool WindowsGLContext::ThreadFrame(bool waitIfEmpty) {
return renderManager_->ThreadFrame(waitIfEmpty);
bool WindowsGLContext::ThreadFrame() {
return renderManager_->ThreadFrame();
}
void WindowsGLContext::ThreadEnd() {
renderManager_->ThreadEnd();
}
void WindowsGLContext::NotifyEmuThreadExit() {
// renderManager_->SetSkipGLCalls(); // not necessary on desktop, maybe unadvisable?
renderManager_->NotifyEmuThreadExit();
}
+5 -1
View File
@@ -33,7 +33,11 @@ public:
// If these are used, they are called from the render thread. If NeedsRenderThread is false, they are not called.
void ThreadStart() override;
void ThreadEnd() override;
bool ThreadFrame(bool waitIfEmpty) override;
// If this returns false, the render thread has been instructed to exit.
bool ThreadFrame() override;
void NotifyEmuThreadExit() override;
Draw::DrawContext *GetDrawContext() override { return draw_; }