From 1d91357cad3a32204a3afd594ec0d9d8c527075e Mon Sep 17 00:00:00 2001
From: Chloe <25387744+qimiko@users.noreply.github.com>
Date: Fri, 15 Nov 2024 15:37:18 -0700
Subject: [PATCH] so i don't forget anymore
---
.../com/geode/launcher/GeometryDashActivity.kt | 2 ++
.../com/geode/launcher/main/ErrorComponents.kt | 15 ++++++++++++++-
.../java/com/geode/launcher/utils/LaunchUtils.kt | 1 +
app/src/main/res/values/strings.xml | 1 +
4 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/app/src/main/java/com/geode/launcher/GeometryDashActivity.kt b/app/src/main/java/com/geode/launcher/GeometryDashActivity.kt
index 9c58d17a..973eaa05 100644
--- a/app/src/main/java/com/geode/launcher/GeometryDashActivity.kt
+++ b/app/src/main/java/com/geode/launcher/GeometryDashActivity.kt
@@ -87,6 +87,8 @@ class GeometryDashActivity : AppCompatActivity(), Cocos2dxHelper.Cocos2dxHelperL
val errorMessage = when {
abiMismatch && is64bit -> LaunchUtils.LauncherError.LINKER_NEEDS_32BIT
abiMismatch -> LaunchUtils.LauncherError.LINKER_NEEDS_64BIT
+ e.message?.contains("__gxx_personality_v0") == true ->
+ LaunchUtils.LauncherError.LINKER_FAILED_STL
else -> LaunchUtils.LauncherError.LINKER_FAILED
}
diff --git a/app/src/main/java/com/geode/launcher/main/ErrorComponents.kt b/app/src/main/java/com/geode/launcher/main/ErrorComponents.kt
index c3131158..992bff90 100644
--- a/app/src/main/java/com/geode/launcher/main/ErrorComponents.kt
+++ b/app/src/main/java/com/geode/launcher/main/ErrorComponents.kt
@@ -70,8 +70,20 @@ fun ErrorInfoBody(failureReason: LaunchUtils.LauncherError, modifier: Modifier =
else -> stringResource(R.string.load_failed_generic_error_description)
}
+ val context = LocalContext.current
val recommendations = when (failureReason) {
- LaunchUtils.LauncherError.LINKER_FAILED -> listOf(
+ LaunchUtils.LauncherError.LINKER_FAILED_STL -> {
+ val isDeveloper = PreferenceUtils.get(context).getBoolean(PreferenceUtils.Key.DEVELOPER_MODE)
+
+ buildList {
+ add(stringResource(R.string.load_failed_recommendation_update))
+ add(stringResource(R.string.load_failed_recommendation_report))
+
+ if (isDeveloper)
+ add(stringResource(R.string.load_failed_recommendation_dev_stl))
+ }
+ }
+ LaunchUtils.LauncherError.LINKER_FAILED -> listOfNotNull(
stringResource(R.string.load_failed_recommendation_reinstall),
stringResource(R.string.load_failed_recommendation_update),
)
@@ -100,6 +112,7 @@ fun ErrorInfoTitle(failureReason: LaunchUtils.LauncherError) {
val message = when (failureReason) {
LaunchUtils.LauncherError.LINKER_NEEDS_64BIT,
LaunchUtils.LauncherError.LINKER_NEEDS_32BIT,
+ LaunchUtils.LauncherError.LINKER_FAILED_STL,
LaunchUtils.LauncherError.LINKER_FAILED -> stringResource(R.string.load_failed_link_error)
LaunchUtils.LauncherError.GENERIC -> stringResource(R.string.load_failed_generic_error)
LaunchUtils.LauncherError.CRASHED -> stringResource(R.string.load_failed_crashed)
diff --git a/app/src/main/java/com/geode/launcher/utils/LaunchUtils.kt b/app/src/main/java/com/geode/launcher/utils/LaunchUtils.kt
index bc82b9ce..a70878f8 100644
--- a/app/src/main/java/com/geode/launcher/utils/LaunchUtils.kt
+++ b/app/src/main/java/com/geode/launcher/utils/LaunchUtils.kt
@@ -95,6 +95,7 @@ object LaunchUtils {
enum class LauncherError {
LINKER_NEEDS_64BIT,
LINKER_NEEDS_32BIT,
+ LINKER_FAILED_STL,
LINKER_FAILED,
GENERIC,
CRASHED;
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 2feba39b..78c0a377 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -99,6 +99,7 @@
Verify that the latest versions of the launcher and Geometry Dash are installed.
Report this issue to the developers.
Hold the Launch button to launch in safe mode.
+ Devs: If this is a locally built Geode version, please use the c++_shared ANDROID_STL!
Cancel
OK