dolphin/Source/Core/Core
JosJuice 5440c7737f Explicitly transfer control of SYSCONF to emulated system
The functions SaveToSYSCONF and LoadFromSYSCONF contain checks for
whether emulation is running. The intent of this is that when we're
emulating a Wii, the emulated system may write to SYSCONF whenever it
likes and does not expect anything else to write to SYSCONF, so the
host code shouldn't access SYSCONF while emulation is ongoing. However,
Core::IsRunning is an imperfect proxy for whether we've handed over
control of SYSCONF to the emulated system yet, as the actual handover
happens at a slightly different point in time than when the emulation
state is changed. This usually isn't a problem, but in theory it could
be a determinism problem if a setting is changed right as emulation is
starting, or it could cause the emulated software to briefly misbehave
if a setting is changed right as emulation is stopping.

Things got worse in 72cf2bdb87 when I
replaced the Core::IsRunning calls with !Core::IsUninitialized. With
IsRunning, there was be a period of time where SYSCONF should have been
protected but wasn't. With !IsUninitialized, there was a period of time
where SYSCONF shouldn't have been protected but was, and crucially, this
period of time included the moments where we do setup and teardown of
the emulated NAND, which broke transferring SYSCONF settings between the
host and the guest. 72cf2bdb87 was
reverted because of this.

This commit adds a flag that we explicitly flip when control is handed
over to or from the emulated system. This protects the SYSCONF file
for exactly as long as is needed.
2026-02-14 10:05:27 +01:00
..
Boot Remove unused imports 2026-01-25 16:12:15 +01:00
Config feat: Add an option to preserve audio pitch when emulation speed changes, integrating it into core configuration and both Qt and Android UIs. 2026-01-27 18:48:22 -05:00
ConfigLoaders Explicitly transfer control of SYSCONF to emulated system 2026-02-14 10:05:27 +01:00
Debugger Remove unused imports 2026-01-25 16:12:15 +01:00
DSP Remove unused imports 2026-01-25 16:12:15 +01:00
FifoPlayer Remove unused imports 2026-01-25 16:12:15 +01:00
HLE Remove unused imports 2026-01-25 16:12:15 +01:00
HW UnitTests: Add PageTableHostMappingTest 2026-02-04 21:35:22 +01:00
IOS Remove unused imports 2026-01-25 16:12:15 +01:00
PowerPC Core: Don't create page table mappings before R/C bits are set 2026-02-04 21:35:22 +01:00
AchievementManager.cpp RetroAchievements - Fix Aliases 2026-01-30 18:48:56 -05:00
AchievementManager.h Core/AchievementManager: Refactor IsApprovedCode and users 2026-01-24 18:02:57 +01:00
ActionReplay.cpp Remove unused imports 2026-01-25 16:12:15 +01:00
ActionReplay.h
ARDecrypt.cpp ARDecrypt: Code modernization. 2026-01-18 01:22:10 -06:00
ARDecrypt.h ARDecrypt: Code modernization. 2026-01-18 01:22:10 -06:00
BootManager.cpp Explicitly transfer control of SYSCONF to emulated system 2026-02-14 10:05:27 +01:00
BootManager.h
CheatCodes.h
CheatGeneration.cpp Common: Replace Result with C++23's std::expected. 2026-01-17 16:58:45 -06:00
CheatGeneration.h Common: Replace Result with C++23's std::expected. 2026-01-17 16:58:45 -06:00
CheatSearch.cpp Common: Replace Result with C++23's std::expected. 2026-01-17 16:58:45 -06:00
CheatSearch.h Common: Replace Result with C++23's std::expected. 2026-01-17 16:58:45 -06:00
CMakeLists.txt cpp-ipc: Fix builds on non-FreeBSD BSDs 2026-01-06 21:46:33 +01:00
CommonTitles.h
ConfigManager.cpp Merge pull request #14303 from Sintendo/game-ini 2026-01-24 15:36:29 -05:00
ConfigManager.h Merge pull request #14303 from Sintendo/game-ini 2026-01-24 15:36:29 -05:00
Core.cpp Core: Make RunOnCPUThread always non-blocking. 2026-02-03 17:29:17 -06:00
Core.h Core: Make RunOnCPUThread always non-blocking. 2026-02-03 17:29:17 -06:00
CoreTiming.cpp
CoreTiming.h
CPUThreadConfigCallback.cpp
CPUThreadConfigCallback.h
DolphinAnalytics.cpp c++23: Replace Common::ToUnderlying with std::to_underlying 2026-01-09 23:49:10 +01:00
DolphinAnalytics.h
DSPEmulator.cpp
DSPEmulator.h
FreeLookManager.cpp
FreeLookManager.h Remove unused imports 2026-01-25 16:12:15 +01:00
GeckoCode.cpp Remove unused imports 2026-01-25 16:12:15 +01:00
GeckoCode.h
GeckoCodeConfig.cpp Remove unused imports 2026-01-25 16:12:15 +01:00
GeckoCodeConfig.h
Host.h
HotkeyManager.cpp Remove unused imports 2026-01-25 16:12:15 +01:00
HotkeyManager.h Remove unused imports 2026-01-25 16:12:15 +01:00
LibusbUtils.cpp
LibusbUtils.h
MachineContext.h
MemoryWatcher.cpp Remove unused imports 2026-01-25 16:12:15 +01:00
MemoryWatcher.h
MemTools.cpp Remove unused imports 2026-01-25 16:12:15 +01:00
MemTools.h
Movie.cpp Remove unused imports 2026-01-25 16:12:15 +01:00
Movie.h Remove unused imports 2026-01-25 16:12:15 +01:00
NetPlayClient.cpp Remove unused imports 2026-01-25 16:12:15 +01:00
NetPlayClient.h
NetPlayCommon.cpp
NetPlayCommon.h
NetPlayProto.h Remove unused imports 2026-01-25 16:12:15 +01:00
NetPlayServer.cpp Remove unused imports 2026-01-25 16:12:15 +01:00
NetPlayServer.h Remove unused imports 2026-01-25 16:12:15 +01:00
NetworkCaptureLogger.cpp Remove unused imports 2026-01-25 16:12:15 +01:00
NetworkCaptureLogger.h Remove unused imports 2026-01-25 16:12:15 +01:00
PatchEngine.cpp
PatchEngine.h
State.cpp Merge pull request #13768 from JosJuice/page-table-fastmem-2 2026-02-04 16:20:35 -05:00
State.h State: Simplify interthread communication and cleanups. Save/Load calls are now always non-blocking for the caller, but appropriately block the CPU thread as needed. 2026-01-19 21:56:59 -06:00
SyncIdentifier.h
SysConf.cpp Remove unused imports 2026-01-25 16:12:15 +01:00
SysConf.h
System.cpp
System.h
TimePlayed.cpp
TimePlayed.h
TitleDatabase.cpp Remove unused imports 2026-01-25 16:12:15 +01:00
TitleDatabase.h
USBUtils.cpp Remove unused imports 2026-01-25 16:12:15 +01:00
USBUtils.h
WC24PatchEngine.cpp
WC24PatchEngine.h
WiiRoot.cpp Remove unused imports 2026-01-25 16:12:15 +01:00
WiiRoot.h
WiiUtils.cpp c++23: Replace Common::ToUnderlying with std::to_underlying 2026-01-09 23:49:10 +01:00
WiiUtils.h Remove unused imports 2026-01-25 16:12:15 +01:00