forked from pool/sdl12_compat
Accepting request 994185 from games
- Add 0001-Use-SDL_PIXELFORMAT_RGB888-for-24-bit-surfaces.patch to rectify BGR order in older schismtracker. OBS-URL: https://build.opensuse.org/request/show/994185 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sdl12_compat?expand=0&rev=3
This commit is contained in:
commit
d377be101c
31
0001-Use-SDL_PIXELFORMAT_RGB888-for-24-bit-surfaces.patch
Normal file
31
0001-Use-SDL_PIXELFORMAT_RGB888-for-24-bit-surfaces.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 940352955ffef7ab4113bc28a2454a8f66b8e3f7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Gow <david@ingeniumdigital.com>
|
||||||
|
Date: Mon, 2 May 2022 17:43:36 +0800
|
||||||
|
Subject: [PATCH] Use SDL_PIXELFORMAT_RGB888 for 24-bit surfaces
|
||||||
|
|
||||||
|
We're currently using SDL_PIXELFORMAT_RGB24, which results in
|
||||||
|
schismtracker being blue when resized (#183).
|
||||||
|
|
||||||
|
While it's possible that RGB888 is wrong on big-endian systems, it at
|
||||||
|
least matches what we do for 16-bit (RGB565) and 32-bit (XRGB8888)
|
||||||
|
formats, so if we're wrong, we'll at least be consistently wrong.
|
||||||
|
---
|
||||||
|
src/SDL12_compat.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
|
||||||
|
index db22c30..78e4d7e 100644
|
||||||
|
--- a/src/SDL12_compat.c
|
||||||
|
+++ b/src/SDL12_compat.c
|
||||||
|
@@ -5231,7 +5231,7 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags12)
|
||||||
|
switch (bpp) {
|
||||||
|
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 24: appfmt = SDL_PIXELFORMAT_RGB888; 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;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 8 14:18:26 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- Add 0001-Use-SDL_PIXELFORMAT_RGB888-for-24-bit-surfaces.patch
|
||||||
|
to rectify BGR order in older schismtracker.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jun 15 12:12:01 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
|
Wed Jun 15 12:12:01 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ Source8: baselibs.conf
|
|||||||
Source9: %name-rpmlintrc
|
Source9: %name-rpmlintrc
|
||||||
Patch1: 0001-SDL_GetWMInfo-work-like-1.2-when-SDL_SetVideoMode-ha.patch
|
Patch1: 0001-SDL_GetWMInfo-work-like-1.2-when-SDL_SetVideoMode-ha.patch
|
||||||
Patch2: 0001-Set-pixels-in-SDL_CreateYUVOverlay-Fix-164.patch
|
Patch2: 0001-Set-pixels-in-SDL_CreateYUVOverlay-Fix-164.patch
|
||||||
|
Patch3: 0001-Use-SDL_PIXELFORMAT_RGB888-for-24-bit-surfaces.patch
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: pkg-config
|
BuildRequires: pkg-config
|
||||||
BuildRequires: pkgconfig(sdl2)
|
BuildRequires: pkgconfig(sdl2)
|
||||||
|
Loading…
Reference in New Issue
Block a user