dolphin/Source/Android
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
..
app Merge pull request #13594 from jordan-woyak/state-cleanups 2026-02-03 16:50:52 -06:00
benchmark Android: Use compilerOptions block to specify JVM version 2026-01-01 13:43:38 +01:00
gradle/wrapper Android: Update Gradle Wrapper 2025-11-12 08:13:30 -05:00
jni Explicitly transfer control of SYSCONF to emulated system 2026-02-14 10:05:27 +01:00
.gitignore android: Regenerate baseline profile module for AGP 8.2.0 2023-12-09 15:44:29 -05:00
build.gradle.kts Android: Update dependencies 2025-11-11 16:48:12 -05:00
code-style-java.xml
gradle.properties Android: Fix Gradle deprecation 2024-05-25 22:13:25 -04:00
gradlew Android: Update Gradle Wrapper 2025-11-12 08:13:30 -05:00
gradlew.bat Android: Update Gradle Wrapper 2025-11-12 08:13:30 -05:00
settings.gradle.kts android: Regenerate baseline profile module for AGP 8.2.0 2023-12-09 15:44:29 -05:00