summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-08-30 03:28:31 +0200
committerbunnei <bunneidev@gmail.com>2016-08-30 03:42:31 +0200
commit7299895b4833521ebf80cc8812c734382e60225f (patch)
tree586d402c0b7e1e9ddd732eb1cc1d5ffcd22d3f22 /src/core
parentconfig: Add a setting for graphics V-Sync. (diff)
downloadyuzu-7299895b4833521ebf80cc8812c734382e60225f.tar
yuzu-7299895b4833521ebf80cc8812c734382e60225f.tar.gz
yuzu-7299895b4833521ebf80cc8812c734382e60225f.tar.bz2
yuzu-7299895b4833521ebf80cc8812c734382e60225f.tar.lz
yuzu-7299895b4833521ebf80cc8812c734382e60225f.tar.xz
yuzu-7299895b4833521ebf80cc8812c734382e60225f.tar.zst
yuzu-7299895b4833521ebf80cc8812c734382e60225f.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/system.cpp10
-rw-r--r--src/core/system.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/core/system.cpp b/src/core/system.cpp
index 4a4757af3..4fc266cb0 100644
--- a/src/core/system.cpp
+++ b/src/core/system.cpp
@@ -17,6 +17,8 @@
namespace System {
+static bool is_powered_on{ false };
+
Result Init(EmuWindow* emu_window) {
Core::Init();
CoreTiming::Init();
@@ -30,9 +32,15 @@ Result Init(EmuWindow* emu_window) {
AudioCore::Init();
GDBStub::Init();
+ is_powered_on = true;
+
return Result::Success;
}
+bool IsPoweredOn() {
+ return is_powered_on;
+}
+
void Shutdown() {
GDBStub::Shutdown();
AudioCore::Shutdown();
@@ -42,6 +50,8 @@ void Shutdown() {
HW::Shutdown();
CoreTiming::Shutdown();
Core::Shutdown();
+
+ is_powered_on = false;
}
} // namespace
diff --git a/src/core/system.h b/src/core/system.h
index a4a627ea9..fb0ca4e1b 100644
--- a/src/core/system.h
+++ b/src/core/system.h
@@ -16,6 +16,7 @@ enum class Result {
};
Result Init(EmuWindow* emu_window);
+bool IsPoweredOn();
void Shutdown();
}