mirror of
https://github.com/UberGames/ioef.git
synced 2025-02-17 09:22:03 +00:00
Merge pull request #135 from Pan7/SDL_Index
SDL_GetWindowDisplayIndex check
This commit is contained in:
commit
5a495d5824
1 changed files with 6 additions and 1 deletions
|
@ -136,11 +136,16 @@ 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: %s\n", SDL_GetError() );
|
||||
return;
|
||||
}
|
||||
numSDLModes = SDL_GetNumDisplayModes( display );
|
||||
|
||||
if( SDL_GetWindowDisplayMode( SDL_window, &windowMode ) < 0 || numSDLModes <= 0 )
|
||||
{
|
||||
ri.Printf( PRINT_WARNING, "Couldn't get window display mode, no resolutions detected\n" );
|
||||
ri.Printf( PRINT_WARNING, "Couldn't get window display mode, no resolutions detected: %s\n", SDL_GetError() );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue