diff options
author | bunnei <bunneidev@gmail.com> | 2015-04-17 05:31:14 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-05-02 00:27:00 +0200 |
commit | 28df8dbfeb17cf5a002a5504a6bd2ba5091bf07c (patch) | |
tree | 57733ea06f6594a5fd4ed7b191130b963895deb2 /src/citra_qt/bootmanager.h | |
parent | EmuThread: Remove unused filename attribute. (diff) | |
download | yuzu-28df8dbfeb17cf5a002a5504a6bd2ba5091bf07c.tar yuzu-28df8dbfeb17cf5a002a5504a6bd2ba5091bf07c.tar.gz yuzu-28df8dbfeb17cf5a002a5504a6bd2ba5091bf07c.tar.bz2 yuzu-28df8dbfeb17cf5a002a5504a6bd2ba5091bf07c.tar.lz yuzu-28df8dbfeb17cf5a002a5504a6bd2ba5091bf07c.tar.xz yuzu-28df8dbfeb17cf5a002a5504a6bd2ba5091bf07c.tar.zst yuzu-28df8dbfeb17cf5a002a5504a6bd2ba5091bf07c.zip |
Diffstat (limited to 'src/citra_qt/bootmanager.h')
-rw-r--r-- | src/citra_qt/bootmanager.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/citra_qt/bootmanager.h b/src/citra_qt/bootmanager.h index 8083d275b..f6f09773c 100644 --- a/src/citra_qt/bootmanager.h +++ b/src/citra_qt/bootmanager.h @@ -9,6 +9,7 @@ #include "common/common.h" #include "common/emu_window.h" +#include "common/thread.h" class QScreen; class QKeyEvent; @@ -37,20 +38,31 @@ public: void ExecStep() { exec_cpu_step = true; } /** - * Allow the CPU to continue processing instructions without interruption + * Sets whether the CPU is running * * @note This function is thread-safe */ void SetCpuRunning(bool running) { cpu_running = running; } /** - * Allow the CPU to continue processing instructions without interruption - * - * @note This function is thread-safe - */ + * Allow the CPU to continue processing instructions without interruption + * + * @note This function is thread-safe + */ bool IsCpuRunning() { return cpu_running; } + /** + * Shutdown (permantently stops) the CPU + */ + void ShutdownCpu() { stop_run = true; }; + + /** + * Waits for the CPU shutdown to complete + */ + void WaitForCpuShutdown() { shutdown_event.Wait(); } + + public slots: /** * Stop emulation and wait for the thread to finish. @@ -71,6 +83,8 @@ private: GRenderWindow* render_window; + Common::Event shutdown_event; + signals: /** * Emitted when the CPU has halted execution |