From 169c8d5140df522561f0f44d1490eea14e44b27b Mon Sep 17 00:00:00 2001 From: ImThour Date: Wed, 15 Jan 2025 11:27:00 +0530 Subject: [PATCH] Fix incorrect hotspot calculation for cursor positioning Corrected the calculation of the vertical hotspot position in the `GetCachedCursor` function. Changed the variable from `data->hot_x` to `data->hot_y` to ensure the correct vertical position of the cursor's hotspot is used when scaling. --- src/video/windows/SDL_windowsmouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/windows/SDL_windowsmouse.c b/src/video/windows/SDL_windowsmouse.c index af99ef6276..3a1c7cac89 100644 --- a/src/video/windows/SDL_windowsmouse.c +++ b/src/video/windows/SDL_windowsmouse.c @@ -390,7 +390,7 @@ static HCURSOR GetCachedCursor(SDL_Cursor *cursor) } int hot_x = (int)SDL_round(data->hot_x * scale); - int hot_y = (int)SDL_round(data->hot_x * scale); + int hot_y = (int)SDL_round(data->hot_y * scale); hcursor = WIN_CreateHCursor(surface, hot_x, hot_y); if (!hcursor) { goto error;