dolphin/Source/Core
JosJuice c1aa3d326d 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.
2025-03-15 17:54:02 +01:00
..
AudioCommon AudioCommon: Added Granular Synthesis 2025-03-14 01:22:35 -05:00
Common Merge pull request #12866 from JosJuice/android-log-types-sorting 2025-03-15 16:01:33 +01:00
Core Explicitly transfer control of SYSCONF to emulated system 2025-03-15 17:54:02 +01:00
DiscIO Fix build with minizip-ng 4.0.8 2025-01-19 10:30:41 +01:00
DolphinNoGUI Merge pull request #13181 from tygyh/Replace-'reinterpret_cast' 2025-03-15 15:31:38 +01:00
DolphinQt Merge pull request #13181 from tygyh/Replace-'reinterpret_cast' 2025-03-15 15:31:38 +01:00
DolphinTool VerifyTool: Add missing USE_RETRO_ACHIEVEMENTS ifdefs 2024-12-15 18:15:57 +01:00
InputCommon Merge pull request #13363 from JoshuaVandaele/nowarnings 2025-03-10 15:04:14 -04:00
MacUpdater ScmRevGen: Don't generate Info.plist files directly 2024-12-05 14:56:08 -05:00
UICommon Fix build with minizip-ng 4.0.8 2025-01-19 10:30:41 +01:00
UpdaterCommon Simplify std::copy with std::copy_n 2024-10-07 15:34:56 -07:00
VideoBackends Merge pull request #13181 from tygyh/Replace-'reinterpret_cast' 2025-03-15 15:31:38 +01:00
VideoCommon Fix broken merge of PR #13181 2025-03-15 17:23:39 +01:00
WinUpdater Core/WinUpdater: fix typo 2025-03-08 09:58:50 -05:00
CMakeLists.txt CMakeLists: Embed macOS Updater app inside DolphinQt 2024-08-01 22:06:55 -04:00
DolphinLib.ARM64.props
DolphinLib.props AudioCommon: Added Granular Synthesis 2025-03-14 01:22:35 -05:00
DolphinLib.vcxproj AudioCommon: Added Granular Synthesis 2025-03-14 01:22:35 -05:00
DolphinLib.vcxproj.user
DolphinLib.x64.props
VersionInfo.plist.in ScmRevGen: Don't generate Info.plist files directly 2024-12-05 14:56:08 -05:00