From b18c361b0fe28e30e3bea459b5c10c58c71dbb85 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 8 Oct 2022 13:18:00 -0700 Subject: [PATCH] Updated variable name for mouse coordinates in mouse wheel events --- include/SDL_events.h | 4 ++-- src/events/SDL_mouse.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/SDL_events.h b/include/SDL_events.h index c2db57a94..55a343e08 100644 --- a/include/SDL_events.h +++ b/include/SDL_events.h @@ -318,8 +318,8 @@ typedef struct SDL_MouseWheelEvent Uint32 direction; /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */ float preciseX; /**< The amount scrolled horizontally, positive to the right and negative to the left, with float precision (added in 2.0.18) */ float preciseY; /**< The amount scrolled vertically, positive away from the user and negative toward the user, with float precision (added in 2.0.18) */ - Sint32 mouse_x; /**< X coordinate, relative to window (added in 2.26.0) */ - Sint32 mouse_y; /**< Y coordinate, relative to window (added in 2.26.0) */ + Sint32 mouseX; /**< X coordinate, relative to window (added in 2.26.0) */ + Sint32 mouseY; /**< Y coordinate, relative to window (added in 2.26.0) */ } SDL_MouseWheelEvent; /** diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c index 53937c4fa..f315674ff 100644 --- a/src/events/SDL_mouse.c +++ b/src/events/SDL_mouse.c @@ -868,8 +868,8 @@ SDL_SendMouseWheel(SDL_Window * window, SDL_MouseID mouseID, float x, float y, S event.wheel.preciseX = x; event.wheel.preciseY = y; event.wheel.direction = (Uint32)direction; - event.wheel.mouse_x = mouse->x; - event.wheel.mouse_y = mouse->y; + event.wheel.mouseX = mouse->x; + event.wheel.mouseY = mouse->y; posted = (SDL_PushEvent(&event) > 0); } return posted;