mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-15 21:58:56 +02:00
[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>
This commit is contained in:
parent
a7ef19e028
commit
27cadb24f3
1 changed files with 11 additions and 1 deletions
|
|
@ -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!!)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue