Updated raw input events to match SDL style

Also added raw keyboard events, and implemented raw input events on iOS, OpenBSD console, Linux console, and X11
This commit is contained in:
Sam Lantinga
2024-12-19 16:18:05 -08:00
parent 1025087c2e
commit c44fa5bb07
25 changed files with 515 additions and 312 deletions

View File

@@ -1210,9 +1210,11 @@ static bool OPENVR_GL_SwapWindow(SDL_VideoDevice *_this, SDL_Window *window)
static void OPENVR_HandleMouse(float x, float y, int btn, int evt)
{
if (evt == 2) {
SDL_SendMouseMotion(0, 0, 0, false, (int)x, (int)y);
SDL_SendMouseMotion(0, NULL, SDL_GLOBAL_MOUSE_ID, false, x, y);
} else {
SDL_SendMouseButton(0, 0, 0, btn + 1, (evt != 0));
const Uint8 button = SDL_BUTTON_LEFT + btn;
const bool down = (evt != 0);
SDL_SendMouseButton(0, NULL, SDL_GLOBAL_MOUSE_ID, button, down);
}
}