mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-28 14:08:28 +00:00
Pass the OS event timestamp for keyboard, mouse, and touch events where possible
Currently implemented for Windows and Apple platforms
This commit is contained in:
@@ -204,7 +204,7 @@ int Android_OnPadDown(int device_id, int keycode)
|
||||
if (item && item->joystick) {
|
||||
SDL_PrivateJoystickButton(item->joystick, button, SDL_PRESSED);
|
||||
} else {
|
||||
SDL_SendKeyboardKey(SDL_PRESSED, button_to_scancode(button));
|
||||
SDL_SendKeyboardKey(0, SDL_PRESSED, button_to_scancode(button));
|
||||
}
|
||||
SDL_UnlockJoysticks();
|
||||
return 0;
|
||||
@@ -223,7 +223,7 @@ int Android_OnPadUp(int device_id, int keycode)
|
||||
if (item && item->joystick) {
|
||||
SDL_PrivateJoystickButton(item->joystick, button, SDL_RELEASED);
|
||||
} else {
|
||||
SDL_SendKeyboardKey(SDL_RELEASED, button_to_scancode(button));
|
||||
SDL_SendKeyboardKey(0, SDL_RELEASED, button_to_scancode(button));
|
||||
}
|
||||
SDL_UnlockJoysticks();
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user