summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar t8952024-01-03 21:40:10 -0500
committerGravatar t8952024-01-03 22:50:21 -0500
commit39d28a51317bbb352cbd51f9e019011b7fd63d9d (patch)
treebf9271ad969efe9678b37de49ea65cb4501f1e2e /src
parentfrontend_common: config: Only write setting related to opened config file (diff)
downloadyuzu-39d28a51317bbb352cbd51f9e019011b7fd63d9d.tar.gz
yuzu-39d28a51317bbb352cbd51f9e019011b7fd63d9d.tar.xz
yuzu-39d28a51317bbb352cbd51f9e019011b7fd63d9d.zip
android: Save global config synchronously in onCloseGameFoldersFragment
Could cause multiple global saves at once that went untracked previously
Diffstat (limited to 'src')
-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() {
167 } 167 }
168 } 168 }
169 169
170 fun onCloseGameFoldersFragment() = 170 fun onCloseGameFoldersFragment() {
171 NativeConfig.saveGlobalConfig()
171 viewModelScope.launch { 172 viewModelScope.launch {
172 withContext(Dispatchers.IO) { 173 withContext(Dispatchers.IO) {
173 NativeConfig.saveGlobalConfig()
174 getGameDirs(true) 174 getGameDirs(true)
175 } 175 }
176 } 176 }
177 }
177 178
178 private fun getGameDirs(reloadList: Boolean = false) { 179 private fun getGameDirs(reloadList: Boolean = false) {
179 val gameDirs = NativeConfig.getGameDirs() 180 val gameDirs = NativeConfig.getGameDirs()