From 8b99cf49e77b5a001c6dd7c20b2bdb5db776617a Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Thu, 27 May 2021 17:25:29 -0400
Subject: [PATCH] 32-bit screen surfaces shouldn't have an alpha channel.
Fixes #67.
---
src/SDL12_compat.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index 8fec9e0..a9835f5 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -3390,7 +3390,7 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags12)
case 8: appfmt = SDL_PIXELFORMAT_INDEX8; break;
case 16: appfmt = SDL_PIXELFORMAT_RGB565; FIXME("bgr instead of rgb?"); break;
case 24: appfmt = SDL_PIXELFORMAT_RGB24; FIXME("bgr instead of rgb?"); break;
- case 32: appfmt = SDL_PIXELFORMAT_ARGB8888; FIXME("bgr instead of rgb?"); break;
+ case 32: appfmt = SDL_PIXELFORMAT_XRGB8888; FIXME("bgr instead of rgb?"); break;
default: SDL20_SetError("Unsupported bits-per-pixel"); return NULL;
}
@@ -3857,6 +3857,7 @@ SDL_DisplayFormat(SDL12_Surface *surface12)
DECLSPEC SDL12_Surface * SDLCALL
SDL_DisplayFormatAlpha(SDL12_Surface *surface12)
{
+ FIXME("This was correct when the display surface had an alpha channel, but isn't now.");
return SDL_DisplayFormat(surface12);
}