Skip to content

Commit 169c8d5

Browse files
thouravislouken
authored andcommitted
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.
1 parent 8e9c44b commit 169c8d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/video/windows/SDL_windowsmouse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ static HCURSOR GetCachedCursor(SDL_Cursor *cursor)
390390
}
391391

392392
int hot_x = (int)SDL_round(data->hot_x * scale);
393-
int hot_y = (int)SDL_round(data->hot_x * scale);
393+
int hot_y = (int)SDL_round(data->hot_y * scale);
394394
hcursor = WIN_CreateHCursor(surface, hot_x, hot_y);
395395
if (!hcursor) {
396396
goto error;

0 commit comments

Comments
 (0)