Skip to content

Commit

Permalink
windows: Minor tweaks that makes Windows XP vidmodes work again.
Browse files Browse the repository at this point in the history
(thanks @madebr!)

Fixes libsdl-org#8328.
Reference Issue libsdl-org#8666.
  • Loading branch information
icculus committed Jan 26, 2024
1 parent ca331f1 commit a4a37b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/video/windows/SDL_windowsmodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ static void WIN_UpdateDisplayMode(SDL_VideoDevice *_this, LPCWSTR deviceName, DW
mode->format = SDL_PIXELFORMAT_XRGB8888;
break;
case 0x000000FF:
mode->format = SDL_PIXELFORMAT_XBGR8888;
if (bmi->bmiHeader.biBitCount == 24) {
mode->format = SDL_PIXELFORMAT_BGR24;
} else {
mode->format = SDL_PIXELFORMAT_XBGR8888;
}
break;
case 0xF800:
mode->format = SDL_PIXELFORMAT_RGB565;
Expand Down

0 comments on commit a4a37b2

Please sign in to comment.