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.h39
1 files changed, 9 insertions, 30 deletions
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h
index 79b030304..3626604ca 100644
--- a/src/yuzu/bootmanager.h
+++ b/src/yuzu/bootmanager.h
@@ -18,15 +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
namespace VideoCore {
enum class LoadCallbackStage;
@@ -36,7 +31,7 @@ class EmuThread final : public QThread {
Q_OBJECT
public:
- explicit EmuThread(GRenderWindow& window);
+ explicit EmuThread();
~EmuThread() override;
/**
@@ -90,12 +85,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,16 +113,12 @@ 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,
- void* surface) const override;
std::unique_ptr<Core::Frontend::GraphicsContext> CreateSharedContext() const override;
void BackupGeometry();
@@ -165,6 +150,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 +163,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,23 +176,16 @@ private:
EmuThread* emu_thread;
- std::unique_ptr<GraphicsContext> core_context;
-
-#ifdef HAS_VULKAN
- std::unique_ptr<QVulkanInstance> vk_instance;
-#endif
+ // 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;
/// Temporary storage of the screenshot taken
QImage screenshot_image;
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;