diff options
author | Rodrigo Locatti <rodrigo.locatti@gmail.com> | 2021-06-22 09:22:19 +0200 |
---|---|---|
committer | Rodrigo Locatti <rodrigo.locatti@gmail.com> | 2021-06-22 09:33:07 +0200 |
commit | c9c8537643b970c44d60961f3fefaa223a4a2362 (patch) | |
tree | bd770fb510107c73fce5ce94da9576639f42817e | |
parent | Merge pull request #6499 from FernandoS27/we-were-on-a-break (diff) | |
download | yuzu-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 |
-rw-r--r-- | src/core/core.cpp | 5 |
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() { |