Skip to content

Commit

Permalink
Use the requested cursor size instead of the default cursor size
Browse files Browse the repository at this point in the history
CopyImage() will scale based on the system accessibility settings automatically.

Fixes #5198
  • Loading branch information
slouken committed Jan 8, 2022
1 parent 6d3b5d6 commit 1085c31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/windows/SDL_windowsmouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ WIN_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y)

/* The cursor returned by CreateIconIndirect does not respect system cursor size
preference, use CopyImage to duplicate the cursor with desired sizes */
hcursor = CopyImage(hicon, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE);
hcursor = CopyImage(hicon, IMAGE_CURSOR, surface->w, surface->h, 0);
DestroyIcon(hicon);

if (!hcursor) {
Expand Down

0 comments on commit 1085c31

Please sign in to comment.