Also allow remap of Left and Right Thumb buttons (analog stick clicks)
This commit is contained in:
committed by
Sergii Pylypenko
parent
64068d6b26
commit
fdbcb421c2
@@ -128,6 +128,8 @@ extern DECLSPEC int SDLCALL SDL_ToggleScreenKeyboard(void *unused);
|
||||
|
||||
extern DECLSPEC int SDLCALL SDL_IsScreenKeyboardShown(void *unused);
|
||||
|
||||
extern DECLSPEC void SDLCALL SDL_ANDROID_set_java_gamepad_keymap(int A, int B, int C, int X, int Y, int Z, int L1, int R1, int L2, int R2, int LT, int RT);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1475,7 +1475,7 @@ JAVA_EXPORT_NAME(Settings_nativeInitKeymap) ( JNIEnv* env, jobject thiz )
|
||||
SDL_android_init_keymap(SDL_android_keymap);
|
||||
}
|
||||
|
||||
void SDL_ANDROID_set_java_gamepad_keymap(int A, int B, int C, int X, int Y, int Z, int L1, int R1, int L2, int R2)
|
||||
void SDL_ANDROID_set_java_gamepad_keymap(int A, int B, int C, int X, int Y, int Z, int L1, int R1, int L2, int R2, int LT, int RT)
|
||||
{
|
||||
/*
|
||||
Arguments are SDL keycodes. Use the SDLK_ constants.
|
||||
@@ -1497,4 +1497,6 @@ void SDL_ANDROID_set_java_gamepad_keymap(int A, int B, int C, int X, int Y, int
|
||||
if (R1) SDL_android_keymap[KEYCODE_BUTTON_R1] = R1;
|
||||
if (L2) SDL_android_keymap[KEYCODE_BUTTON_L2] = L2;
|
||||
if (R2) SDL_android_keymap[KEYCODE_BUTTON_R2] = R2;
|
||||
if (LT) SDL_android_keymap[KEYCODE_BUTTON_THUMBL] = LT;
|
||||
if (RT) SDL_android_keymap[KEYCODE_BUTTON_THUMBR] = RT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user