From ddf10cdb1800e39d21b47385eeb2205a1a106715 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 4 Feb 2023 01:42:52 -0800 Subject: android: frontend: Modify ROM load messaging for invalid keys. --- .../src/main/java/org/yuzu/yuzu_emu/NativeLibrary.java | 16 ++++++++++------ src/android/app/src/main/res/values/strings.xml | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'src/android/app') diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.java b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.java index 44869b233..75395bd4c 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.java +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.java @@ -496,20 +496,24 @@ public final class NativeLibrary { final int ShutdownRequested = 11; final int ErrorUnknown = 12; + int captionId = R.string.loader_error_invalid_format; + if (resultCode == ErrorLoader_ErrorEncrypted) { + captionId = R.string.loader_error_encrypted; + } + + String formatedText = "Please follow the guides to redump your game cartidges or installed titles."; + if (!ReloadKeys()) { + formatedText = "Please ensure your prod.keys file is installed so that games can be decrypted."; + } final EmulationActivity emulationActivity = sEmulationActivity.get(); if (emulationActivity == null) { Log.warning("[NativeLibrary] EmulationActivity is null, can't exit."); return; } - int captionId = R.string.loader_error_invalid_format; - if (resultCode == ErrorLoader_ErrorEncrypted) { - captionId = R.string.loader_error_encrypted; - } - AlertDialog.Builder builder = new AlertDialog.Builder(emulationActivity) .setTitle(captionId) - .setMessage(Html.fromHtml("Please follow the guides to redump your game cartidges or installed titles.", Html.FROM_HTML_MODE_LEGACY)) + .setMessage(Html.fromHtml(formatedText, Html.FROM_HTML_MODE_LEGACY)) .setPositiveButton(android.R.string.ok, (dialog, whichButton) -> emulationActivity.finish()) .setOnDismissListener(dialogInterface -> emulationActivity.finish()); emulationActivity.runOnUiThread(() -> { diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 1c6858a60..5535f9ded 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -62,7 +62,7 @@ Your ROM is encrypted - Invalid ROM format + Unable to load ROM Exit Emulation -- cgit v1.2.3