diff options
| author | xbzk <xbzk@eden-emu.dev> | 2026-04-14 00:21:51 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-04-14 00:21:51 +0200 |
| commit | 27cadb24f3b9feacc0312b89632cd8555c3db588 (patch) | |
| tree | 05b2659e1fea651562e901813c4bd759606a89e2 /src/android | |
| parent | a7ef19e0286b9913c451f500a52ec3fe2c3f576c (diff) | |
[android, intent] Run restoreContentForGame for shortcut launching + Improve custom settings context for shortcut launching (based on normal launch) (#3854)
intended to fix two bugs identified by Pavel upon android shortcut launching (and prolly all FEs since the rely on intent launching too):
1. external content not loading: fixed by running restoreContentForGame for per game mount in content path.
2. custom settings no loading: that was proven to be user side, but adjustments were made to match normal launch.
should be harmless for normal usage. once validated can be merged.
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3854
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Co-authored-by: xbzk <xbzk@eden-emu.dev>
Co-committed-by: xbzk <xbzk@eden-emu.dev>
Diffstat (limited to 'src/android')
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt index a4c9eb9039..19dbe288bb 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt @@ -291,13 +291,23 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { // Game launched via intent (check for existing custom config) intentGame != null -> { game?.let { gameInstance -> + runCatching { GameHelper.restoreContentForGame(gameInstance) } + .onFailure { + Log.warning( + "[EmulationFragment] Failed to restore content for intent launch: ${it.message}" + ) + } + val customConfigFile = SettingsFile.getCustomSettingsFile(gameInstance) if (customConfigFile.exists()) { + shouldUseCustom = true Log.info( "[EmulationFragment] Found existing custom settings for ${gameInstance.title}, loading them" ) SettingsFile.loadCustomConfig(gameInstance) + NativeConfig.unloadPerGameConfig() } else { + shouldUseCustom = false Log.info( "[EmulationFragment] No custom settings found for ${gameInstance.title}, using global settings" ) @@ -871,7 +881,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { if (drawerView == binding.quickSettingsSheet) { isQuickSettingsMenuOpen = true if (shouldUseCustom) { - SettingsFile.loadCustomConfig(args.game!!) + SettingsFile.loadCustomConfig(game!!) } } } |
