[android] config: load configuration on game start (#3965)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run

This PR reloads Android configuration when starting a game, so Eden uses the latest config.ini state for the emulation session.

On some Android launchers, Eden can already be running in the background before a game is launched. In that case, config.ini has already been read, so configuration changes made outside of Eden's settings flow while the process is alive are not picked up by the next emulation session.

This improves launch/config behavior for external launcher workflows.

Co-authored-by: FL-gs <efge.crea@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3965
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
fl.gs 2026-05-23 21:19:34 +02:00 committed by crueter
parent 37b5cf6003
commit b870bd255c
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
2 changed files with 5 additions and 0 deletions

View file

@ -127,6 +127,8 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener, InputManager
super.onCreate(savedInstanceState)
NativeConfig.reloadGlobalConfig()
InputHandler.updateControllerData()
val players = NativeConfig.getInputSettings(true)
var hasConfiguredControllers = false

View file

@ -19,6 +19,9 @@ AndroidConfig::AndroidConfig(const std::string& config_name, ConfigType config_t
}
void AndroidConfig::ReloadAllValues() {
// Ensure the INI file is current before reloading values.
SetUpIni();
Reload();
ReadAndroidValues();
SaveAndroidValues();