Fix various warnings
This commit is contained in:
1 parent
549b686e22
commit
f976711fb4
58 files changed
+384
-425
No files matched your search
@@ -697,21 +697,21 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder, qbool
|
||||
|
||||
if( fullscreen )
|
||||
{
|
||||
SDL_DisplayMode mode;
|
||||
SDL_DisplayMode desiredMode;
|
||||
|
||||
switch( testColorBits )
|
||||
{
|
||||
case 16: mode.format = SDL_PIXELFORMAT_RGB565; break;
|
||||
case 24: mode.format = SDL_PIXELFORMAT_RGB24; break;
|
||||
case 16: desiredMode.format = SDL_PIXELFORMAT_RGB565; break;
|
||||
case 24: desiredMode.format = SDL_PIXELFORMAT_RGB24; break;
|
||||
default: ri.Printf( PRINT_DEVELOPER, "testColorBits is %d, can't fullscreen\n", testColorBits ); continue;
|
||||
}
|
||||
|
||||
mode.w = glConfig.vidWidth;
|
||||
mode.h = glConfig.vidHeight;
|
||||
mode.refresh_rate = glConfig.displayFrequency = ri.Cvar_VariableIntegerValue( "r_displayRefresh" );
|
||||
mode.driverdata = NULL;
|
||||
desiredMode.w = glConfig.vidWidth;
|
||||
desiredMode.h = glConfig.vidHeight;
|
||||
desiredMode.refresh_rate = glConfig.displayFrequency = ri.Cvar_VariableIntegerValue( "r_displayRefresh" );
|
||||
desiredMode.driverdata = NULL;
|
||||
|
||||
if( SDL_SetWindowDisplayMode( SDL_window, &mode ) < 0 )
|
||||
if( SDL_SetWindowDisplayMode( SDL_window, &desiredMode ) < 0 )
|
||||
{
|
||||
ri.Printf( PRINT_DEVELOPER, "SDL_SetWindowDisplayMode failed: %s\n", SDL_GetError( ) );
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user