mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 14:52:00 +00:00
SDL_GetWindowDisplayIndex check
This commit is contained in:
parent
605dfabb94
commit
9694e93fd2
1 changed files with 5 additions and 0 deletions
|
@ -136,6 +136,11 @@ static void GLimp_DetectAvailableModes(void)
|
|||
|
||||
SDL_DisplayMode windowMode;
|
||||
int display = SDL_GetWindowDisplayIndex( SDL_window );
|
||||
if( display < 0 )
|
||||
{
|
||||
ri.Printf( PRINT_WARNING, "Couldn't get window display index, no resolutions detected\n" );
|
||||
return;
|
||||
}
|
||||
numSDLModes = SDL_GetNumDisplayModes( display );
|
||||
|
||||
if( SDL_GetWindowDisplayMode( SDL_window, &windowMode ) < 0 || numSDLModes <= 0 )
|
||||
|
|
Loading…
Reference in a new issue