mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 11:35:31 +00:00
Fixed declaration-after-statement warning
This commit is contained in:
parent
d2c4d74dd0
commit
fd2a2eea10
|
@ -511,9 +511,10 @@ register_methods(JNIEnv *env, const char *classname, JNINativeMethod *methods, i
|
||||||
/* Library init */
|
/* Library init */
|
||||||
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved)
|
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved)
|
||||||
{
|
{
|
||||||
mJavaVM = vm;
|
|
||||||
JNIEnv *env = NULL;
|
JNIEnv *env = NULL;
|
||||||
|
|
||||||
|
mJavaVM = vm;
|
||||||
|
|
||||||
if ((*mJavaVM)->GetEnv(mJavaVM, (void **)&env, JNI_VERSION_1_4) != JNI_OK) {
|
if ((*mJavaVM)->GetEnv(mJavaVM, (void **)&env, JNI_VERSION_1_4) != JNI_OK) {
|
||||||
__android_log_print(ANDROID_LOG_ERROR, "SDL", "Failed to get JNI Env");
|
__android_log_print(ANDROID_LOG_ERROR, "SDL", "Failed to get JNI Env");
|
||||||
return JNI_VERSION_1_4;
|
return JNI_VERSION_1_4;
|
||||||
|
@ -2553,6 +2554,7 @@ SDL_bool Android_JNI_SetRelativeMouseEnabled(SDL_bool enabled)
|
||||||
SDL_bool Android_JNI_RequestPermission(const char *permission)
|
SDL_bool Android_JNI_RequestPermission(const char *permission)
|
||||||
{
|
{
|
||||||
JNIEnv *env = Android_JNI_GetEnv();
|
JNIEnv *env = Android_JNI_GetEnv();
|
||||||
|
jstring jpermission;
|
||||||
const int requestCode = 1;
|
const int requestCode = 1;
|
||||||
|
|
||||||
/* Wait for any pending request on another thread */
|
/* Wait for any pending request on another thread */
|
||||||
|
@ -2561,7 +2563,7 @@ SDL_bool Android_JNI_RequestPermission(const char *permission)
|
||||||
}
|
}
|
||||||
SDL_AtomicSet(&bPermissionRequestPending, SDL_TRUE);
|
SDL_AtomicSet(&bPermissionRequestPending, SDL_TRUE);
|
||||||
|
|
||||||
jstring jpermission = (*env)->NewStringUTF(env, permission);
|
jpermission = (*env)->NewStringUTF(env, permission);
|
||||||
(*env)->CallStaticVoidMethod(env, mActivityClass, midRequestPermission, jpermission, requestCode);
|
(*env)->CallStaticVoidMethod(env, mActivityClass, midRequestPermission, jpermission, requestCode);
|
||||||
(*env)->DeleteLocalRef(env, jpermission);
|
(*env)->DeleteLocalRef(env, jpermission);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue