diff options
author | Mai M <mathew1800@gmail.com> | 2021-06-22 10:28:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-22 10:28:38 +0200 |
commit | 698add85413780d062039f2807953d17e56ac3ec (patch) | |
tree | 71600095a83aa9b711298232ecd5a1ca872649cb /src | |
parent | Merge pull request #6481 from Morph1984/missing-peak-set (diff) | |
parent | core: Make is_powered_on atomic (diff) | |
download | yuzu-698add85413780d062039f2807953d17e56ac3ec.tar yuzu-698add85413780d062039f2807953d17e56ac3ec.tar.gz yuzu-698add85413780d062039f2807953d17e56ac3ec.tar.bz2 yuzu-698add85413780d062039f2807953d17e56ac3ec.tar.lz yuzu-698add85413780d062039f2807953d17e56ac3ec.tar.xz yuzu-698add85413780d062039f2807953d17e56ac3ec.tar.zst yuzu-698add85413780d062039f2807953d17e56ac3ec.zip |
Diffstat (limited to '')
-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() { |