mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-13 07:13:35 +00:00
Fix Mouse button index
This commit is contained in:
committed by
Frank Praznik
parent
fab42a1432
commit
c9baf208bd
@@ -875,7 +875,7 @@ static void pointer_handle_leave(void *data, struct wl_pointer *pointer,
|
||||
|
||||
SDL_WaylandSeat *seat = (SDL_WaylandSeat *)data;
|
||||
seat->pointer.focus = NULL;
|
||||
for (int i = 0; seat->pointer.buttons_pressed; ++i) {
|
||||
for (int i = 1; seat->pointer.buttons_pressed; ++i) {
|
||||
if (seat->pointer.buttons_pressed & SDL_BUTTON_MASK(i)) {
|
||||
SDL_SendMouseButton(0, window->sdlwindow, seat->pointer.sdl_id, i, false);
|
||||
seat->pointer.buttons_pressed &= ~SDL_BUTTON_MASK(i);
|
||||
|
||||
Reference in New Issue
Block a user