mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-28 01:21:35 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user