windows: Minor tweaks that makes Windows XP vidmodes work again.

(thanks @madebr!)

Fixes #8328.
Reference Issue #8666.
main
Ryan C. Gordon 2024-01-25 19:41:31 -05:00
parent 6ca596cfc1
commit dcd26a80e5
1 changed files with 8 additions and 4 deletions

View File

@ -70,10 +70,14 @@ static void WIN_UpdateDisplayMode(SDL_VideoDevice *_this, LPCWSTR deviceName, DW
mode->format = SDL_PIXELFORMAT_RGB555; mode->format = SDL_PIXELFORMAT_RGB555;
break; break;
} }
} else if (bmi->bmiHeader.biBitCount == 8) { } else if (bmi->bmiHeader.biCompression == BI_RGB) {
mode->format = SDL_PIXELFORMAT_INDEX8; if (bmi->bmiHeader.biBitCount == 24) {
} else if (bmi->bmiHeader.biBitCount == 4) { mode->format = SDL_PIXELFORMAT_RGB24;
mode->format = SDL_PIXELFORMAT_INDEX4LSB; } else if (bmi->bmiHeader.biBitCount == 8) {
mode->format = SDL_PIXELFORMAT_INDEX8;
} else if (bmi->bmiHeader.biBitCount == 4) {
mode->format = SDL_PIXELFORMAT_INDEX4LSB;
}
} }
} else if (mode->format == SDL_PIXELFORMAT_UNKNOWN) { } else if (mode->format == SDL_PIXELFORMAT_UNKNOWN) {
/* FIXME: Can we tell what this will be? */ /* FIXME: Can we tell what this will be? */