Skip to content

Commit 56119b2

Browse files
committed
video: Apparently 24-bit video is intended to be BGR24 pixels.
We had changed this in 9403529, from RGB24 to RGB888, which fixed Schismtracker, but this isn't actually correct either, I guess. Using BGR24 fixes "Powder", which apparently _needs_ a 24-bit packed format, and Schismtracker still works correctly, so I think we're good here now. I hope. Fixes #199.
1 parent 64f8aa8 commit 56119b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SDL12_compat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5693,7 +5693,7 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags12)
56935693
switch (bpp) {
56945694
case 8: appfmt = SDL_PIXELFORMAT_INDEX8; break;
56955695
case 16: appfmt = SDL_PIXELFORMAT_RGB565; break;
5696-
case 24: appfmt = SDL_PIXELFORMAT_RGB888; break;
5696+
case 24: appfmt = SDL_PIXELFORMAT_BGR24; break;
56975697
case 32: appfmt = SDL_PIXELFORMAT_XRGB8888; break;
56985698
default: SDL20_SetError("Unsupported bits-per-pixel"); return NULL;
56995699
}

0 commit comments

Comments
 (0)