From 762c1a9ff5406afc4c6b1a3eb74dae2dc2fb0daf Mon Sep 17 00:00:00 2001 From: bunnei Date: Thu, 16 Apr 2015 18:35:09 -0400 Subject: Qt: Move EmuThread ownership from render window to main window. --- src/citra_qt/bootmanager.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/citra_qt/bootmanager.h') diff --git a/src/citra_qt/bootmanager.h b/src/citra_qt/bootmanager.h index 288da45a1..d3eab6ec1 100644 --- a/src/citra_qt/bootmanager.h +++ b/src/citra_qt/bootmanager.h @@ -14,6 +14,7 @@ class QScreen; class QKeyEvent; class GRenderWindow; +class GMainWindow; class EmuThread : public QThread { @@ -67,7 +68,7 @@ public slots: void Stop(); private: - friend class GRenderWindow; + friend class GMainWindow; EmuThread(GRenderWindow* render_window); @@ -100,10 +101,7 @@ class GRenderWindow : public QWidget, public EmuWindow Q_OBJECT public: - GRenderWindow(QWidget* parent = NULL); - ~GRenderWindow(); - - void closeEvent(QCloseEvent*) override; + GRenderWindow(QWidget* parent, GMainWindow& main_window); // EmuWindow implementation void SwapBuffers() override; @@ -116,8 +114,6 @@ public: void restoreGeometry(const QByteArray& geometry); // overridden QByteArray saveGeometry(); // overridden - EmuThread& GetEmuThread(); - void keyPressEvent(QKeyEvent* event) override; void keyReleaseEvent(QKeyEvent* event) override; @@ -139,10 +135,10 @@ private: QGLWidget* child; - EmuThread emu_thread; - QByteArray geometry; + GMainWindow& main_window; + /// Device id of keyboard for use with KeyMap int keyboard_id; }; -- cgit v1.2.3