summaryrefslogtreecommitdiffstats
path: root/src/video_core/gpu.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-12-13 18:30:15 +0100
committerAlexander Orzechowski <alex@ozal.ski>2022-12-13 19:23:23 +0100
commitd5f53da79d944869eb88416494ecf10a47eee90d (patch)
tree8b2bc2084d711ba2196d2e8121216eac25e982cb /src/video_core/gpu.cpp
parentMerge pull request #9425 from german77/german_unlimited (diff)
downloadyuzu-d5f53da79d944869eb88416494ecf10a47eee90d.tar
yuzu-d5f53da79d944869eb88416494ecf10a47eee90d.tar.gz
yuzu-d5f53da79d944869eb88416494ecf10a47eee90d.tar.bz2
yuzu-d5f53da79d944869eb88416494ecf10a47eee90d.tar.lz
yuzu-d5f53da79d944869eb88416494ecf10a47eee90d.tar.xz
yuzu-d5f53da79d944869eb88416494ecf10a47eee90d.tar.zst
yuzu-d5f53da79d944869eb88416494ecf10a47eee90d.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/gpu.cpp5
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();
}