Merge pull request #19738 from hrydgard/joystick-java-bug

Android joystick event handling: Don't blow up java ref counting by forgetting ReleaseElements.
This commit is contained in:
Henrik Rydgård
2024-12-15 23:57:35 +01:00
committed by GitHub
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -170,7 +170,7 @@ bool TextDrawerAndroid::DrawStringBitmap(std::vector<uint8_t> &bitmapData, TextS
} else {
_assert_msg_(false, "Bad TextDrawer format");
}
env->ReleaseIntArrayElements(imageData, jimage, 0);
env->ReleaseIntArrayElements(imageData, jimage, JNI_ABORT);
env->DeleteLocalRef(imageData);
return true;
}
+2
View File
@@ -1290,6 +1290,8 @@ extern "C" void Java_org_ppsspp_ppsspp_NativeApp_joystickAxis(
}
NativeAxis(axis, count);
delete[] axis;
env->ReleaseIntArrayElements(axisIds, axisIdBuffer, JNI_ABORT); // ABORT just means we don't want changes copied back!
env->ReleaseFloatArrayElements(values, valueBuffer, JNI_ABORT); // ABORT just means we don't want changes copied back!
}
extern "C" jboolean Java_org_ppsspp_ppsspp_NativeApp_mouseWheelEvent(