Don't create multiple windows when GL context creation fails
This commit is contained in:
parent
4fa93fbfd4
commit
77de5019b9
1 changed files with 2 additions and 0 deletions
|
@ -641,6 +641,8 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder, qbool
|
||||||
if( ( SDL_glContext = SDL_GL_CreateContext( SDL_window ) ) == NULL )
|
if( ( SDL_glContext = SDL_GL_CreateContext( SDL_window ) ) == NULL )
|
||||||
{
|
{
|
||||||
ri.Printf( PRINT_DEVELOPER, "SDL_GL_CreateContext failed: %s\n", SDL_GetError( ) );
|
ri.Printf( PRINT_DEVELOPER, "SDL_GL_CreateContext failed: %s\n", SDL_GetError( ) );
|
||||||
|
SDL_DestroyWindow( SDL_window );
|
||||||
|
SDL_window = NULL;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue