summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/bootmanager.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-04-29 01:03:01 +0200
committerbunnei <bunneidev@gmail.com>2015-05-02 00:27:07 +0200
commite4ea133717a5292339c134160da984ba186d3de8 (patch)
treef6c3e289eaee3c79375d136279509523d4b3aca8 /src/citra_qt/bootmanager.h
parentQt: Fix loading a new game without stopping emulation. (diff)
downloadyuzu-e4ea133717a5292339c134160da984ba186d3de8.tar
yuzu-e4ea133717a5292339c134160da984ba186d3de8.tar.gz
yuzu-e4ea133717a5292339c134160da984ba186d3de8.tar.bz2
yuzu-e4ea133717a5292339c134160da984ba186d3de8.tar.lz
yuzu-e4ea133717a5292339c134160da984ba186d3de8.tar.xz
yuzu-e4ea133717a5292339c134160da984ba186d3de8.tar.zst
yuzu-e4ea133717a5292339c134160da984ba186d3de8.zip
Diffstat (limited to '')
-rw-r--r--src/citra_qt/bootmanager.h44
1 files changed, 12 insertions, 32 deletions
diff --git a/src/citra_qt/bootmanager.h b/src/citra_qt/bootmanager.h
index f6f09773c..e9b3ea664 100644
--- a/src/citra_qt/bootmanager.h
+++ b/src/citra_qt/bootmanager.h
@@ -25,66 +25,46 @@ public:
/**
* Start emulation (on new thread)
- *
* @warning Only call when not running!
*/
void run() override;
/**
- * Allow the CPU to process a single instruction (if cpu is not running)
- *
+ * Steps the emulation thread by a single CPU instruction (if the CPU is not already running)
* @note This function is thread-safe
*/
- void ExecStep() { exec_cpu_step = true; }
+ void ExecStep() { exec_step = true; }
/**
- * Sets whether the CPU is running
- *
+ * Sets whether the emulation thread is running or not
+ * @param running Boolean value, set the emulation thread to running if true
* @note This function is thread-safe
*/
- void SetCpuRunning(bool running) { cpu_running = running; }
+ void SetRunning(bool running) { this->running = running; }
/**
- * Allow the CPU to continue processing instructions without interruption
- *
+ * Check if the emulation thread is running or not
+ * @return True if the emulation thread is running, otherwise false
* @note This function is thread-safe
*/
- bool IsCpuRunning() { return cpu_running; }
-
-
- /**
- * Shutdown (permantently stops) the CPU
- */
- void ShutdownCpu() { stop_run = true; };
+ bool IsRunning() { return running; }
/**
- * Waits for the CPU shutdown to complete
+ * Shutdown (permanently stops) the emulation thread
*/
- void WaitForCpuShutdown() { shutdown_event.Wait(); }
-
-
-public slots:
- /**
- * Stop emulation and wait for the thread to finish.
- *
- * @details: This function will wait a second for the thread to finish; if it hasn't finished until then, we'll terminate() it and wait another second, hoping that it will be terminated by then.
- * @note: This function is thread-safe.
- */
- void Stop();
+ void Shutdown() { stop_run = true; };
private:
friend class GMainWindow;
EmuThread(GRenderWindow* render_window);
- bool exec_cpu_step;
- bool cpu_running;
+ bool exec_step;
+ bool running;
std::atomic<bool> stop_run;
GRenderWindow* render_window;
- Common::Event shutdown_event;
-
signals:
/**
* Emitted when the CPU has halted execution