summaryrefslogtreecommitdiff
path: root/src/video_core/gpu.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2022-12-15 12:05:01 -0500
committerGitHub <noreply@github.com>2022-12-15 12:05:01 -0500
commit3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6 (patch)
tree0d014da28cf6a8a1045cd2a7d7df8301522ea47c /src/video_core/gpu.cpp
parente2f32e8c88621dbb816d38bc1ffc610d7eb2ae03 (diff)
parent09e3029c1118616394e5e9c45dfcdd4adcdf86ad (diff)
Merge pull request #7410 from Nefsen402/wayland-fixes
Wayland fixes
Diffstat (limited to 'src/video_core/gpu.cpp')
-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();
}