mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 01:01:07 +00:00
gl_vidsdl.c: fix ValidMode(), bpp < 16 is problematic on windows
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@815 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
6c23dcd91f
commit
ca18412bac
1 changed files with 17 additions and 1 deletions
|
@ -203,10 +203,26 @@ static qboolean VID_ValidMode (int width, int height, int bpp, qboolean fullscre
|
|||
{
|
||||
Uint32 flags = SDL_DEFAULT_FLAGS;
|
||||
|
||||
if (width < 320)
|
||||
return false;
|
||||
|
||||
if (height < 200)
|
||||
return false;
|
||||
|
||||
switch (bpp)
|
||||
{
|
||||
case 16:
|
||||
case 24:
|
||||
case 32:
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fullscreen)
|
||||
flags |= SDL_FULLSCREEN;
|
||||
|
||||
if (width < 320 || height < 200 || !SDL_VideoModeOK(width, height, bpp, flags))
|
||||
if (!SDL_VideoModeOK(width, height, bpp, flags))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue