summaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
authort895 <clombardo169@gmail.com>2024-01-03 21:40:10 -0500
committert895 <clombardo169@gmail.com>2024-01-03 22:50:21 -0500
commit39d28a51317bbb352cbd51f9e019011b7fd63d9d (patch)
treebf9271ad969efe9678b37de49ea65cb4501f1e2e /src/android
parentfa04dea7c4f0d5dba86cdec23d6e8262752983e9 (diff)
android: Save global config synchronously in onCloseGameFoldersFragment
Could cause multiple global saves at once that went untracked previously
Diffstat (limited to 'src/android')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt
index d19f20dc2..5ae05b5cc 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt
@@ -167,13 +167,14 @@ class GamesViewModel : ViewModel() {
}
}
- fun onCloseGameFoldersFragment() =
+ fun onCloseGameFoldersFragment() {
+ NativeConfig.saveGlobalConfig()
viewModelScope.launch {
withContext(Dispatchers.IO) {
- NativeConfig.saveGlobalConfig()
getGameDirs(true)
}
}
+ }
private fun getGameDirs(reloadList: Boolean = false) {
val gameDirs = NativeConfig.getGameDirs()