mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-10 03:46:27 +00:00
Initial support for hotplugging mice and keyboards
This commit is contained in:
@@ -205,7 +205,7 @@ int Android_OnPadDown(int device_id, int keycode)
|
||||
if (item && item->joystick) {
|
||||
SDL_SendJoystickButton(timestamp, item->joystick, button, SDL_PRESSED);
|
||||
} else {
|
||||
SDL_SendKeyboardKey(timestamp, SDL_PRESSED, button_to_scancode(button));
|
||||
SDL_SendKeyboardKey(timestamp, 0, SDL_PRESSED, button_to_scancode(button));
|
||||
}
|
||||
SDL_UnlockJoysticks();
|
||||
return 0;
|
||||
@@ -225,7 +225,7 @@ int Android_OnPadUp(int device_id, int keycode)
|
||||
if (item && item->joystick) {
|
||||
SDL_SendJoystickButton(timestamp, item->joystick, button, SDL_RELEASED);
|
||||
} else {
|
||||
SDL_SendKeyboardKey(timestamp, SDL_RELEASED, button_to_scancode(button));
|
||||
SDL_SendKeyboardKey(timestamp, 0, SDL_RELEASED, button_to_scancode(button));
|
||||
}
|
||||
SDL_UnlockJoysticks();
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user