summaryrefslogtreecommitdiff
path: root/src/yuzu/bootmanager.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-02-21 12:40:23 -0500
committerbunnei <bunneidev@gmail.com>2020-02-25 21:23:02 -0500
commitc6f78a4a6d8746b84b2891e536286d9d6a63015e (patch)
tree341376f25aaa9008eedcff6a39c6cfc84acc9ed8 /src/yuzu/bootmanager.h
parente25297536f975db307f7117b3060e9919c44be52 (diff)
frontend: qt: bootmanager: Acquire a shared context in main emu thread.
Diffstat (limited to 'src/yuzu/bootmanager.h')
-rw-r--r--src/yuzu/bootmanager.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h
index 6710a6e7f..79b030304 100644
--- a/src/yuzu/bootmanager.h
+++ b/src/yuzu/bootmanager.h
@@ -17,6 +17,7 @@
#include "core/core.h"
#include "core/frontend/emu_window.h"
+class GRenderWindow;
class QKeyEvent;
class QScreen;
class QTouchEvent;
@@ -35,7 +36,7 @@ class EmuThread final : public QThread {
Q_OBJECT
public:
- explicit EmuThread(Core::Frontend::GraphicsContext& context);
+ explicit EmuThread(GRenderWindow& window);
~EmuThread() override;
/**
@@ -89,7 +90,11 @@ private:
std::mutex running_mutex;
std::condition_variable running_cv;
- Core::Frontend::GraphicsContext& core_context;
+ /// Only used in asynchronous GPU mode
+ std::unique_ptr<Core::Frontend::GraphicsContext> shared_context;
+
+ /// This is shared_context in asynchronous GPU mode, core_context in synchronous GPU mode
+ Core::Frontend::GraphicsContext& context;
signals:
/**