Qt: Use signals for emu_thread start/stop and fix disasm widget.

This commit is contained in:
bunnei 2015-04-29 00:01:41 -04:00
parent e4ea133717
commit 43cf424907
6 changed files with 138 additions and 79 deletions

View file

@ -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;