early-access version 3158

This commit is contained in:
pineappleEA
2022-11-27 02:38:07 +01:00
parent b2cb15f351
commit 8715f21bc6
8 changed files with 31 additions and 14 deletions

View File

@@ -189,7 +189,7 @@ struct System::Impl {
kernel.Suspend(false);
core_timing.SyncPause(false);
is_paused = false;
is_paused.store(false, std::memory_order_relaxed);
return status;
}
@@ -200,14 +200,13 @@ struct System::Impl {
core_timing.SyncPause(true);
kernel.Suspend(true);
is_paused = true;
is_paused.store(true, std::memory_order_relaxed);
return status;
}
bool IsPaused() const {
std::unique_lock lk(suspend_guard);
return is_paused;
return is_paused.load(std::memory_order_relaxed);
}
std::unique_lock<std::mutex> StallProcesses() {
@@ -218,7 +217,7 @@ struct System::Impl {
}
void UnstallProcesses() {
if (!is_paused) {
if (!IsPaused()) {
core_timing.SyncPause(false);
kernel.Suspend(false);
}
@@ -465,7 +464,7 @@ struct System::Impl {
}
mutable std::mutex suspend_guard;
bool is_paused{};
std::atomic_bool is_paused{};
std::atomic<bool> is_shutting_down{};
Timing::CoreTiming core_timing;

View File

@@ -145,6 +145,7 @@ void EmulatedDevices::UnloadInput() {
for (auto& button : keyboard_modifier_devices) {
button.reset();
}
ring_analog_device.reset();
}
void EmulatedDevices::EnableConfiguration() {