summaryrefslogtreecommitdiff
path: root/src/yuzu/bootmanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu/bootmanager.h')
-rw-r--r--src/yuzu/bootmanager.h30
1 files changed, 9 insertions, 21 deletions
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h
index 79b030304..d69078df1 100644
--- a/src/yuzu/bootmanager.h
+++ b/src/yuzu/bootmanager.h
@@ -18,12 +18,10 @@
#include "core/frontend/emu_window.h"
class GRenderWindow;
+class GMainWindow;
class QKeyEvent;
-class QScreen;
class QTouchEvent;
class QStringList;
-class QSurface;
-class QOpenGLContext;
#ifdef HAS_VULKAN
class QVulkanInstance;
#endif
@@ -36,7 +34,7 @@ class EmuThread final : public QThread {
Q_OBJECT
public:
- explicit EmuThread(GRenderWindow& window);
+ explicit EmuThread();
~EmuThread() override;
/**
@@ -90,12 +88,6 @@ private:
std::mutex running_mutex;
std::condition_variable running_cv;
- /// 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:
/**
* Emitted when the CPU has halted execution
@@ -124,12 +116,10 @@ class GRenderWindow : public QWidget, public Core::Frontend::EmuWindow {
Q_OBJECT
public:
- GRenderWindow(QWidget* parent, EmuThread* emu_thread);
+ GRenderWindow(GMainWindow* parent, EmuThread* emu_thread);
~GRenderWindow() override;
// EmuWindow implementation.
- void MakeCurrent() override;
- void DoneCurrent() override;
void PollEvents() override;
bool IsShown() const override;
void RetrieveVulkanHandlers(void* get_instance_proc_addr, void* instance,
@@ -165,6 +155,8 @@ public:
void CaptureScreenshot(u32 res_scale, const QString& screenshot_path);
+ std::pair<u32, u32> ScaleTouch(const QPointF& pos) const;
+
public slots:
void OnEmulationStarting(EmuThread* emu_thread);
void OnEmulationStopping();
@@ -176,7 +168,6 @@ signals:
void FirstFrameDisplayed();
private:
- std::pair<u32, u32> ScaleTouch(QPointF pos) const;
void TouchBeginEvent(const QTouchEvent* event);
void TouchUpdateEvent(const QTouchEvent* event);
void TouchEndEvent();
@@ -190,7 +181,10 @@ private:
EmuThread* emu_thread;
- std::unique_ptr<GraphicsContext> core_context;
+ // Main context that will be shared with all other contexts that are requested.
+ // If this is used in a shared context setting, then this should not be used directly, but
+ // should instead be shared from
+ std::shared_ptr<Core::Frontend::GraphicsContext> main_context;
#ifdef HAS_VULKAN
std::unique_ptr<QVulkanInstance> vk_instance;
@@ -201,12 +195,6 @@ private:
QByteArray geometry;
- /// Native window handle that backs this presentation widget
- QWindow* child_window = nullptr;
-
- /// In order to embed the window into GRenderWindow, you need to use createWindowContainer to
- /// put the child_window into a widget then add it to the layout. This child_widget can be
- /// parented to GRenderWindow and use Qt's lifetime system
QWidget* child_widget = nullptr;
bool first_frame = false;