engine: platform: sdl: do not call SDL_VideoQuit in R_Free_Video, as one failed renderer will shut down whole SDL video subsystem
This commit is contained in:
parent
9a432a5a13
commit
64dbccb9bd
1 changed files with 3 additions and 6 deletions
|
@ -1015,6 +1015,7 @@ qboolean R_Init_Video( const int type )
|
||||||
{
|
{
|
||||||
string safe;
|
string safe;
|
||||||
qboolean retval;
|
qboolean retval;
|
||||||
|
|
||||||
#if SDL_VERSION_ATLEAST( 2, 0, 0 )
|
#if SDL_VERSION_ATLEAST( 2, 0, 0 )
|
||||||
SDL_DisplayMode displayMode;
|
SDL_DisplayMode displayMode;
|
||||||
SDL_GetCurrentDisplayMode( 0, &displayMode );
|
SDL_GetCurrentDisplayMode( 0, &displayMode );
|
||||||
|
@ -1095,7 +1096,7 @@ rserr_t R_ChangeDisplaySettings( int width, int height, window_mode_t window_mod
|
||||||
|
|
||||||
if( SDL_GetCurrentDisplayMode( 0, &displayMode ) < 0 )
|
if( SDL_GetCurrentDisplayMode( 0, &displayMode ) < 0 )
|
||||||
{
|
{
|
||||||
Con_Printf( S_ERROR "SDL_GetCurrentDisplayMode: %s", SDL_GetError( ));
|
Con_Printf( S_ERROR "SDL_GetCurrentDisplayMode: %s\n", SDL_GetError( ));
|
||||||
return rserr_invalid_mode;
|
return rserr_invalid_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1239,10 +1240,6 @@ void R_Free_Video( void )
|
||||||
R_FreeVideoModes();
|
R_FreeVideoModes();
|
||||||
|
|
||||||
ref.dllFuncs.GL_ClearExtensions();
|
ref.dllFuncs.GL_ClearExtensions();
|
||||||
|
|
||||||
#if SDL_VERSION_ATLEAST( 2, 0, 0 )
|
|
||||||
SDL_VideoQuit();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // XASH_DEDICATED
|
#endif // XASH_DEDICATED
|
||||||
|
|
Loading…
Add table
Reference in a new issue