dolphin/Source
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
..
Android 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
DSPSpy
DSPTool GDBStub: Signal Breakpoint Changes To Host 2024-11-15 15:12:11 -08:00
PCH
UnitTests Add a SplitPath unit test exercising Windows paths with drive letters 2025-01-29 22:07:19 -08:00
VSProps Merge pull request #13306 from OatmealDome/cubeb-optional 2025-02-02 17:50:20 +01:00
.clang-format
CMakeLists.txt CMake: don't enable -Wshadow-uncaptured-local 2025-02-21 02:51:32 +00:00
dolphin-emu.sln AudioCommon: Added Granular Synthesis 2025-03-14 01:22:35 -05:00