From 2f810e0a5f27a50b2c73ceaac7bc82df5e26acf8 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 19 Oct 2025 23:51:19 -0700 Subject: [PATCH] Copy properties when converting a surface to a new format This fixes retaining the cursor hotspot when converting cursor frames to SDL_PIXELFORMAT_ARGB8888 --- src/video/SDL_surface.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c index 7c455a9b42..8c0e8bac28 100644 --- a/src/video/SDL_surface.c +++ b/src/video/SDL_surface.c @@ -2147,6 +2147,13 @@ end: } } + // Copy properties + if (surface->props) { + if (!SDL_CopyProperties(surface->props, SDL_GetSurfaceProperties(convert))) { + goto error; + } + } + // We're ready to go! return convert;