aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/citra_qt/main.h
diff options
context:
space:
mode:
authorGravatar bunnei <bunneidev@gmail.com>2015-04-29 00:01:41 -0400
committerGravatar bunnei <bunneidev@gmail.com>2015-05-01 18:34:42 -0400
commit43cf42490730d8a1b980aa1fe9ebbbe1249232ef (patch)
treebdaa812eed455d85517130934e4cf17bd56c6d0b /src/citra_qt/main.h
parente4ea133717a5292339c134160da984ba186d3de8 (diff)
Qt: Use signals for emu_thread start/stop and fix disasm widget.
Diffstat (limited to 'src/citra_qt/main.h')
-rw-r--r--src/citra_qt/main.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h
index 1821ae35..3e29534f 100644
--- a/src/citra_qt/main.h
+++ b/src/citra_qt/main.h
@@ -5,6 +5,7 @@
#ifndef _CITRA_QT_MAIN_HXX_
#define _CITRA_QT_MAIN_HXX_
+#include <memory>
#include <QMainWindow>
#include "ui_main.h"
@@ -35,9 +36,23 @@ public:
GMainWindow();
~GMainWindow();
- EmuThread* GetEmuThread() {
- return emu_thread;
- }
+signals:
+
+ /**
+ * Signal that is emitted when a new EmuThread has been created and an emulation session is
+ * about to start. At this time, the core system emulation has been initialized, and all
+ * emulation handles and memory should be valid.
+ *
+ * @param emu_thread Pointer to the newly created EmuThread (to be used by widgets that need to
+ * access/change emulation state).
+ */
+ void EmulationStarting(EmuThread* emu_thread);
+
+ /**
+ * Signal that is emitted when emulation is about to stop. At this time, the EmuThread and core
+ * system emulation handles and memory are still valid, but are about become invalid.
+ */
+ void EmulationStopping();
private:
void BootGame(std::string filename);
@@ -60,7 +75,8 @@ private:
Ui::MainWindow ui;
GRenderWindow* render_window;
- EmuThread* emu_thread;
+
+ std::unique_ptr<EmuThread> emu_thread;
ProfilerWidget* profilerWidget;
DisassemblerWidget* disasmWidget;