From c698c61f03401d164429557d08075ebb9ffcd82d Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 20 Jan 2025 10:48:13 -0800
Subject: [PATCH] renderer: initialize the surface colorspace correctly
Fixes https://github.com/libsdl-org/SDL/issues/12027
---
src/render/SDL_render.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index 06c0381ca89b2..eed84156130c8 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -1634,7 +1634,7 @@ SDL_Texture *SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *s
}
}
- texture_colorspace = SDL_GetSurfaceColorspace(surface);
+ surface_colorspace = SDL_GetSurfaceColorspace(surface);
// Try to have the best pixel format for the texture
// No alpha, but a colorkey => promote to alpha