mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
Android: Fix mismatching JNI method signature
Another regression from commitdca3fd8307
, which was a backport of commitde3909a190
from SDL3 to SDL2. This time the regression is much less apparent, however, due to two reasons: - It only appears when the SDL project is ran on an actual device due to magic stringage. - More importantly, the regression was partially hidden due to the nature ofde3909a190
. The commit which was backported added a single `I` to the JNI method signature in `SDL_android.c`, representing the added `int axis_mask` parameter. The parameter was added to both SDL2 and SDL3. However, notably, that `I` was added *after* commitfcafe40948
, which removed the `int nballs` parameter from the joystick API, but only from the SDL3 branch. Therefore, in totality, what should really have been a merge conflict, was obscured by the fact that the SDL3 branch ended up having a net-identical JNI signature to the SDL2 branch, due to having one bool param removed and one added - while, in fact, the SDL2 branch needed one bool param added and none removed.
This commit is contained in:

committed by
Sam Lantinga

parent
576df87240
commit
b970dd1beb
@@ -278,7 +278,7 @@ static JNINativeMethod SDLControllerManager_tab[] = {
|
||||
{ "onNativePadUp", "(II)I", SDL_JAVA_CONTROLLER_INTERFACE(onNativePadUp) },
|
||||
{ "onNativeJoy", "(IIF)V", SDL_JAVA_CONTROLLER_INTERFACE(onNativeJoy) },
|
||||
{ "onNativeHat", "(IIII)V", SDL_JAVA_CONTROLLER_INTERFACE(onNativeHat) },
|
||||
{ "nativeAddJoystick", "(ILjava/lang/String;Ljava/lang/String;IIZIIII)I", SDL_JAVA_CONTROLLER_INTERFACE(nativeAddJoystick) },
|
||||
{ "nativeAddJoystick", "(ILjava/lang/String;Ljava/lang/String;IIZIIIII)I", SDL_JAVA_CONTROLLER_INTERFACE(nativeAddJoystick) },
|
||||
{ "nativeRemoveJoystick", "(I)I", SDL_JAVA_CONTROLLER_INTERFACE(nativeRemoveJoystick) },
|
||||
{ "nativeAddHaptic", "(ILjava/lang/String;)I", SDL_JAVA_CONTROLLER_INTERFACE(nativeAddHaptic) },
|
||||
{ "nativeRemoveHaptic", "(I)I", SDL_JAVA_CONTROLLER_INTERFACE(nativeRemoveHaptic) }
|
||||
|
Reference in New Issue
Block a user