diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-12-15 18:05:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-15 18:05:01 +0100 |
commit | 3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6 (patch) | |
tree | 0d014da28cf6a8a1045cd2a7d7df8301522ea47c /src/video_core/gpu.cpp | |
parent | Merge pull request #9441 from yuzu-emu/revert-9232-audio-default-thread (diff) | |
parent | gl_device: Use a more robust way to use strict context mode (diff) | |
download | yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.tar yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.tar.gz yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.tar.bz2 yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.tar.lz yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.tar.xz yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.tar.zst yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.zip |
Diffstat (limited to 'src/video_core/gpu.cpp')
-rw-r--r-- | src/video_core/gpu.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 28b38273e..c6d54be63 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp @@ -223,8 +223,6 @@ struct GPU::Impl { /// core timing events. void Start() { gpu_thread.StartThread(*renderer, renderer->Context(), *scheduler); - cpu_context = renderer->GetRenderWindow().CreateSharedContext(); - cpu_context->MakeCurrent(); } void NotifyShutdown() { @@ -235,6 +233,9 @@ struct GPU::Impl { /// Obtain the CPU Context void ObtainContext() { + if (!cpu_context) { + cpu_context = renderer->GetRenderWindow().CreateSharedContext(); + } cpu_context->MakeCurrent(); } |