From 1085c317a5088b5aba3245b2d4d59ca1cdcf8887 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 7 Jan 2022 16:43:53 -0800 Subject: [PATCH] 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 --- 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 e44ecc4a1..19977e214 100644 --- a/src/video/windows/SDL_windowsmouse.c +++ b/src/video/windows/SDL_windowsmouse.c @@ -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) {