From 53bf2baac3ca32f49c62963a15e6140c696a33cf Mon Sep 17 00:00:00 2001
From: Anthony <[EMAIL REDACTED]>
Date: Tue, 24 Sep 2024 21:35:32 +0100
Subject: [PATCH] Change JNI calls to comply with recent Boolean changes
Android OpenURL and Toast methods return Booleans now, so let's use the correct interface.
---
src/core/android/SDL_android.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c
index e1e18c3cad7c4..75555371db8d3 100644
--- a/src/core/android/SDL_android.c
+++ b/src/core/android/SDL_android.c
@@ -2564,7 +2564,7 @@ bool Android_JNI_ShowToast(const char *message, int duration, int gravity, int x
bool result;
JNIEnv *env = Android_JNI_GetEnv();
jstring jmessage = (*env)->NewStringUTF(env, message);
- result = (*env)->CallStaticIntMethod(env, mActivityClass, midShowToast, jmessage, duration, gravity, xOffset, yOffset);
+ result = (*env)->CallStaticBooleanMethod(env, mActivityClass, midShowToast, jmessage, duration, gravity, xOffset, yOffset);
(*env)->DeleteLocalRef(env, jmessage);
return result;
}
@@ -2632,7 +2632,7 @@ bool Android_JNI_OpenURL(const char *url)
bool result;
JNIEnv *env = Android_JNI_GetEnv();
jstring jurl = (*env)->NewStringUTF(env, url);
- result = (*env)->CallStaticIntMethod(env, mActivityClass, midOpenURL, jurl);
+ result = (*env)->CallStaticBooleanMethod(env, mActivityClass, midOpenURL, jurl);
(*env)->DeleteLocalRef(env, jurl);
return result;
}