summaryrefslogtreecommitdiffstats
path: root/src/android/app
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-03-11 09:46:34 +0100
committerbunnei <bunneidev@gmail.com>2023-06-03 09:05:34 +0200
commit2dfbfadf8218ac60a643cbc8a4c1091bd98ec35c (patch)
tree801f0044409c958a9c855faa445633d14098d519 /src/android/app
parentandroid: Use the center of the object and reduce draw calls (diff)
downloadyuzu-2dfbfadf8218ac60a643cbc8a4c1091bd98ec35c.tar
yuzu-2dfbfadf8218ac60a643cbc8a4c1091bd98ec35c.tar.gz
yuzu-2dfbfadf8218ac60a643cbc8a4c1091bd98ec35c.tar.bz2
yuzu-2dfbfadf8218ac60a643cbc8a4c1091bd98ec35c.tar.lz
yuzu-2dfbfadf8218ac60a643cbc8a4c1091bd98ec35c.tar.xz
yuzu-2dfbfadf8218ac60a643cbc8a4c1091bd98ec35c.tar.zst
yuzu-2dfbfadf8218ac60a643cbc8a4c1091bd98ec35c.zip
Diffstat (limited to 'src/android/app')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.java40
-rw-r--r--src/android/app/src/main/res/values/strings.xml4
2 files changed, 25 insertions, 19 deletions
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 6f76c3f95..067e9938d 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
@@ -508,26 +508,28 @@ public final class NativeLibrary {
final int Success = 0;
final int ErrorNotInitialized = 1;
final int ErrorGetLoader = 2;
- final int ErrorSystemMode = 3;
- final int ErrorLoader = 4;
- final int ErrorLoader_ErrorEncrypted = 5;
- final int ErrorLoader_ErrorInvalidFormat = 6;
- final int ErrorSystemFiles = 7;
- final int ErrorVideoCore = 8;
- final int ErrorVideoCore_ErrorGenericDrivers = 9;
- final int ErrorVideoCore_ErrorBelowGL33 = 10;
- 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;
+ final int ErrorSystemFiles = 3;
+ final int ErrorSharedFont = 4;
+ final int ErrorVideoCore = 5;
+ final int ErrorUnknown = 6;
+ final int ErrorLoader = 7;
+
+ int captionId;
+ int descriptionId;
+ switch (resultCode) {
+ case ErrorVideoCore:
+ captionId = R.string.loader_error_video_core;
+ descriptionId = R.string.loader_error_video_core_description;
+ break;
+ default:
+ captionId = R.string.loader_error_encrypted;
+ descriptionId = R.string.loader_error_encrypted_roms_description;
+ if (!ReloadKeys()) {
+ descriptionId = R.string.loader_error_encrypted_keys_description;
+ }
+ break;
}
- String formatedText = "Please follow the guides to redump your <a href=\"https://yuzu-emu.org/help/quickstart/#dumping-cartridge-games\">game cartidges</a> or <a href=\"https://yuzu-emu.org/help/quickstart/#dumping-installed-titles-eshop\">installed titles</a>.";
- if (!ReloadKeys()) {
- formatedText = "Please ensure your <a href=\"https://yuzu-emu.org/help/quickstart/#dumping-prodkeys-and-titlekeys\">prod.keys</a> 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.");
@@ -536,7 +538,7 @@ public final class NativeLibrary {
AlertDialog.Builder builder = new AlertDialog.Builder(emulationActivity)
.setTitle(captionId)
- .setMessage(Html.fromHtml(formatedText, Html.FROM_HTML_MODE_LEGACY))
+ .setMessage(Html.fromHtml(emulationActivity.getString(descriptionId), 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 c5e6a4e27..aa0cef521 100644
--- a/src/android/app/src/main/res/values/strings.xml
+++ b/src/android/app/src/main/res/values/strings.xml
@@ -76,6 +76,10 @@
<!-- ROM loading errors -->
<string name="loader_error_encrypted">Your ROM is encrypted</string>
+ <string name="loader_error_encrypted_roms_description"><![CDATA[Please follow the guides to redump your <a href="https://yuzu-emu.org/help/quickstart/#dumping-cartridge-games">game cartidges</a> or <a href="https://yuzu-emu.org/help/quickstart/#dumping-installed-titles-eshop">installed titles</a>.]]></string>
+ <string name="loader_error_encrypted_keys_description"><![CDATA[Please ensure your <a href="https://yuzu-emu.org/help/quickstart/#dumping-prodkeys-and-titlekeys">prod.keys</a> file is installed so that games can be decrypted.]]></string>
+ <string name="loader_error_video_core">An error occurred initializing the video core</string>
+ <string name="loader_error_video_core_description">This is usually caused by an incompatible GPU drivers. Installing a custom GPU driver may resolve this problem.</string>
<string name="loader_error_invalid_format">Unable to load ROM</string>
<!-- Emulation Menu -->