summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPabloG02 <tioo23000@gmail.com>2023-05-31 23:37:18 +0200
committerbunnei <bunneidev@gmail.com>2023-06-03 09:06:06 +0200
commit9650c1d02df806cc5a0b958b666305daaf773536 (patch)
treecc60ae4b1e5a8bb70e3f52b323d218ee8bba183c
parentAdd save import/export in UI (diff)
downloadyuzu-9650c1d02df806cc5a0b958b666305daaf773536.tar
yuzu-9650c1d02df806cc5a0b958b666305daaf773536.tar.gz
yuzu-9650c1d02df806cc5a0b958b666305daaf773536.tar.bz2
yuzu-9650c1d02df806cc5a0b958b666305daaf773536.tar.lz
yuzu-9650c1d02df806cc5a0b958b666305daaf773536.tar.xz
yuzu-9650c1d02df806cc5a0b958b666305daaf773536.tar.zst
yuzu-9650c1d02df806cc5a0b958b666305daaf773536.zip
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/ImportExportSavesFragment.kt26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/ImportExportSavesFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/ImportExportSavesFragment.kt
index 20c1b6be5..f623a4e1e 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/ImportExportSavesFragment.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/ImportExportSavesFragment.kt
@@ -66,15 +66,23 @@ class ImportExportSavesFragment : DialogFragment() {
}
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
- return MaterialAlertDialogBuilder(requireContext())
- .setTitle("Import/Export Saves")
- .setPositiveButton("Export") { _, _ ->
- exportSave()
- }
- .setNeutralButton("Import") { _, _ ->
- documentPicker.launch(arrayOf("application/zip"))
- }
- .show()
+ return if (savesFolderRoot == "") {
+ MaterialAlertDialogBuilder(requireContext())
+ .setTitle(R.string.import_export_saves)
+ .setMessage("No profileID found. Launch a game first and then come back.")
+ .setPositiveButton(android.R.string.ok, null)
+ .show()
+ } else {
+ MaterialAlertDialogBuilder(requireContext())
+ .setTitle("Import/Export Saves")
+ .setPositiveButton("Export") { _, _ ->
+ exportSave()
+ }
+ .setNeutralButton("Import") { _, _ ->
+ documentPicker.launch(arrayOf("application/zip"))
+ }
+ .show()
+ }
}
/**