mirror of https://github.com/encounter/SDL.git
Use the requested cursor size instead of the default cursor size
CopyImage() will scale based on the system accessibility settings automatically. Fixes https://github.com/libsdl-org/SDL/issues/5198
This commit is contained in:
parent
6d3b5d66cd
commit
1085c317a5
|
@ -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
|
/* The cursor returned by CreateIconIndirect does not respect system cursor size
|
||||||
preference, use CopyImage to duplicate the cursor with desired sizes */
|
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);
|
DestroyIcon(hicon);
|
||||||
|
|
||||||
if (!hcursor) {
|
if (!hcursor) {
|
||||||
|
|
Loading…
Reference in New Issue