mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Android joystick event handling: Don't blow up java ref counting by forgetting ReleaseElements.
Also, use JNI_ABORT to avoid writing back changes (we don't make any).
This commit is contained in:
parent
3b3b8fe2c1
commit
afbf430899
2 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Add table
Reference in a new issue