summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/bootmanager.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-04-29 06:01:41 +0200
committerbunnei <bunneidev@gmail.com>2015-05-02 00:34:42 +0200
commit43cf42490730d8a1b980aa1fe9ebbbe1249232ef (patch)
treebdaa812eed455d85517130934e4cf17bd56c6d0b /src/citra_qt/bootmanager.h
parentQt: Restructured to remove unnecessary shutdown event and various cleanups. (diff)
downloadyuzu-43cf42490730d8a1b980aa1fe9ebbbe1249232ef.tar
yuzu-43cf42490730d8a1b980aa1fe9ebbbe1249232ef.tar.gz
yuzu-43cf42490730d8a1b980aa1fe9ebbbe1249232ef.tar.bz2
yuzu-43cf42490730d8a1b980aa1fe9ebbbe1249232ef.tar.lz
yuzu-43cf42490730d8a1b980aa1fe9ebbbe1249232ef.tar.xz
yuzu-43cf42490730d8a1b980aa1fe9ebbbe1249232ef.tar.zst
yuzu-43cf42490730d8a1b980aa1fe9ebbbe1249232ef.zip
Diffstat (limited to 'src/citra_qt/bootmanager.h')
-rw-r--r--src/citra_qt/bootmanager.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/citra_qt/bootmanager.h b/src/citra_qt/bootmanager.h
index e9b3ea664..e57522187 100644
--- a/src/citra_qt/bootmanager.h
+++ b/src/citra_qt/bootmanager.h
@@ -22,6 +22,7 @@ class EmuThread : public QThread
Q_OBJECT
public:
+ EmuThread(GRenderWindow* render_window);
/**
* Start emulation (on new thread)
@@ -50,15 +51,14 @@ public:
bool IsRunning() { return running; }
/**
- * Shutdown (permanently stops) the emulation thread
+ * Requests for the emulation thread to stop running and shutdown emulation
*/
- void Shutdown() { stop_run = true; };
+ void RequestShutdown() {
+ stop_run = true;
+ running = false;
+ };
private:
- friend class GMainWindow;
-
- EmuThread(GRenderWindow* render_window);
-
bool exec_step;
bool running;
std::atomic<bool> stop_run;
@@ -86,7 +86,7 @@ class GRenderWindow : public QWidget, public EmuWindow
Q_OBJECT
public:
- GRenderWindow(QWidget* parent, GMainWindow& main_window);
+ GRenderWindow(QWidget* parent, EmuThread* emu_thread);
// EmuWindow implementation
void SwapBuffers() override;
@@ -115,6 +115,9 @@ public:
public slots:
void moveContext(); // overridden
+ void OnEmulationStarted(EmuThread* emu_thread);
+ void OnEmulationStopped();
+
private:
void OnMinimalClientAreaChangeRequest(const std::pair<unsigned,unsigned>& minimal_size) override;
@@ -122,8 +125,8 @@ private:
QByteArray geometry;
- GMainWindow& main_window;
-
/// Device id of keyboard for use with KeyMap
int keyboard_id;
+
+ EmuThread* emu_thread;
};