SDL: Copy properties when converting a surface to a new format

From 2f810e0a5f27a50b2c73ceaac7bc82df5e26acf8 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
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 7c455a9b424f9..8c0e8bac28db3 100644
--- a/src/video/SDL_surface.c
+++ b/src/video/SDL_surface.c
@@ -2147,6 +2147,13 @@ SDL_Surface *SDL_ConvertSurfaceAndColorspace(SDL_Surface *surface, SDL_PixelForm
         }
     }
 
+    // Copy properties
+    if (surface->props) {
+        if (!SDL_CopyProperties(surface->props, SDL_GetSurfaceProperties(convert))) {
+            goto error;
+        }
+    }
+
     // We're ready to go!
     return convert;