dolphin/Source/Android/jni
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
..
AndroidCommon Remove VectorToJStringArray 2026-01-24 16:50:10 +01:00
Cheats Merge pull request #13228 from OatmealDome/fix-curl-2 2025-01-08 18:14:10 +01:00
Config Explicitly transfer control of SYSCONF to emulated system 2026-02-14 10:05:27 +01:00
GameList Remove VectorToJStringArray 2026-01-24 16:50:10 +01:00
Input Android: Fix unused value warning 2025-10-29 16:19:15 -07:00
AchievementAdapter.cpp RetroAchievements - Android login callback 2025-11-18 20:40:15 -05:00
ActivityTracker.cpp Android: Detect when native code should flush unsaved data 2026-01-19 21:56:09 -06:00
CMakeLists.txt Merge pull request #13583 from LillyJadeKatrin/retroachievements-android 2025-11-22 17:00:03 +01:00
GpuDriver.cpp c++23: Replace Common::ToUnderlying with std::to_underlying 2026-01-09 23:49:10 +01:00
Host.cpp Android: Move host thread lock to a separate file 2023-06-12 23:39:42 +02:00
Host.h Core: Remove IsHostThread 2025-11-10 21:14:56 +01:00
InfinityConfig.cpp IOS/USB: Use Enum for Infinity Base Positions 2024-06-27 20:57:27 +01:00
MainAndroid.cpp 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
RiivolutionPatches.cpp
SkylanderConfig.cpp Skylanders: Improve figure data view and generation 2023-11-05 18:06:10 +01:00
WiiUtils.cpp IOS/ES: Split ESDevice into ESCore and ESDevice. 2023-05-15 20:41:05 +02:00