summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-01-24 04:09:22 +0100
committerbunnei <bunneidev@gmail.com>2019-03-07 03:48:56 +0100
commit65651078e5ae60ff14bf6d6e8e367ec7262c4120 (patch)
tree11260b97ca9a99a3ed18c53bb38be4d4e42e1075
parentgpu: Refactor command and swap buffers interface for asynch. (diff)
downloadyuzu-65651078e5ae60ff14bf6d6e8e367ec7262c4120.tar
yuzu-65651078e5ae60ff14bf6d6e8e367ec7262c4120.tar.gz
yuzu-65651078e5ae60ff14bf6d6e8e367ec7262c4120.tar.bz2
yuzu-65651078e5ae60ff14bf6d6e8e367ec7262c4120.tar.lz
yuzu-65651078e5ae60ff14bf6d6e8e367ec7262c4120.tar.xz
yuzu-65651078e5ae60ff14bf6d6e8e367ec7262c4120.tar.zst
yuzu-65651078e5ae60ff14bf6d6e8e367ec7262c4120.zip
-rw-r--r--src/yuzu/bootmanager.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 73b04b749..3b070bfbb 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -20,10 +20,7 @@
EmuThread::EmuThread(GRenderWindow* render_window) : render_window(render_window) {}
void EmuThread::run() {
- if (!Settings::values.use_multi_core) {
- // Single core mode must acquire OpenGL context for entire emulation session
- render_window->MakeCurrent();
- }
+ render_window->MakeCurrent();
MicroProfileOnThreadCreate("EmuThread");
@@ -38,6 +35,11 @@ void EmuThread::run() {
emit LoadProgress(VideoCore::LoadCallbackStage::Complete, 0, 0);
+ if (Settings::values.use_asynchronous_gpu_emulation) {
+ // Release OpenGL context for the GPU thread
+ render_window->DoneCurrent();
+ }
+
// holds whether the cpu was running during the last iteration,
// so that the DebugModeLeft signal can be emitted before the
// next execution step