summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorRodrigo Locatti <rodrigo.locatti@gmail.com>2021-06-22 09:22:19 +0200
committerRodrigo Locatti <rodrigo.locatti@gmail.com>2021-06-22 09:33:07 +0200
commitc9c8537643b970c44d60961f3fefaa223a4a2362 (patch)
treebd770fb510107c73fce5ce94da9576639f42817e /src/core
parentMerge pull request #6499 from FernandoS27/we-were-on-a-break (diff)
downloadyuzu-c9c8537643b970c44d60961f3fefaa223a4a2362.tar
yuzu-c9c8537643b970c44d60961f3fefaa223a4a2362.tar.gz
yuzu-c9c8537643b970c44d60961f3fefaa223a4a2362.tar.bz2
yuzu-c9c8537643b970c44d60961f3fefaa223a4a2362.tar.lz
yuzu-c9c8537643b970c44d60961f3fefaa223a4a2362.tar.xz
yuzu-c9c8537643b970c44d60961f3fefaa223a4a2362.tar.zst
yuzu-c9c8537643b970c44d60961f3fefaa223a4a2362.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index c5004b7b4..e6f1aa0e7 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -3,6 +3,7 @@
// Refer to the license.txt file included.
#include <array>
+#include <atomic>
#include <memory>
#include <utility>
@@ -377,7 +378,7 @@ struct System::Impl {
std::unique_ptr<Core::DeviceMemory> device_memory;
Core::Memory::Memory memory;
CpuManager cpu_manager;
- bool is_powered_on = false;
+ std::atomic_bool is_powered_on{};
bool exit_lock = false;
Reporter reporter;
@@ -463,7 +464,7 @@ System::ResultStatus System::Load(Frontend::EmuWindow& emu_window, const std::st
}
bool System::IsPoweredOn() const {
- return impl->is_powered_on;
+ return impl->is_powered_on.load(std::memory_order::relaxed);
}
void System::PrepareReschedule() {