From ec80cff70248f947574ee65a1329293006455023 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Fri, 18 Jun 2021 10:18:54 +0200 Subject: [PATCH] renderer/glimp: unify some log --- src/engine/sys/sdl_glimp.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/engine/sys/sdl_glimp.cpp b/src/engine/sys/sdl_glimp.cpp index 7a8fc56f96..2ebd3b09b5 100644 --- a/src/engine/sys/sdl_glimp.cpp +++ b/src/engine/sys/sdl_glimp.cpp @@ -653,17 +653,16 @@ static rserr_t GLimp_SetMode( int mode, bool fullscreen, bool noborder ) if ( SDL_GetDesktopDisplayMode( r_displayIndex->integer, &desktopMode ) == 0 ) { displayAspect = ( float ) desktopMode.w / ( float ) desktopMode.h; - logger.Notice("Display aspect: %.3f", displayAspect ); } else { Com_Memset( &desktopMode, 0, sizeof( SDL_DisplayMode ) ); - logger.Notice("Cannot determine display aspect (%s), assuming 1.333", SDL_GetError() ); + logger.Notice("Cannot determine display aspect, assuming 1.333: %s", SDL_GetError() ); + logger.Notice("Display aspect: 1.333"); } - logger.Notice("...setting mode %d:", mode ); if ( mode == -2 ) { @@ -682,11 +681,12 @@ static rserr_t GLimp_SetMode( int mode, bool fullscreen, bool noborder ) } else if ( !R_GetModeInfo( &glConfig.vidWidth, &glConfig.vidHeight, mode ) ) { - logger.Notice(" invalid mode" ); + logger.Notice("Invalid mode %d", mode ); return rserr_t::RSERR_INVALID_MODE; } - logger.Notice(" %d %d", glConfig.vidWidth, glConfig.vidHeight ); + logger.Notice("...setting mode %d: %d×%d", mode, glConfig.vidWidth, glConfig.vidHeight ); + // HACK: We want to set the current value, not the latched value Cvar::ClearFlags("r_customwidth", CVAR_LATCH); Cvar::ClearFlags("r_customheight", CVAR_LATCH); @@ -1034,7 +1034,7 @@ static bool GLimp_StartDriverAndSetMode( int mode, bool fullscreen, bool noborde if ( SDL_Init( SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE ) == -1 ) { - logger.Notice("SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) failed (%s)", SDL_GetError() ); + logger.Notice("SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) failed: %s", SDL_GetError() ); return false; } @@ -1053,7 +1053,7 @@ static bool GLimp_StartDriverAndSetMode( int mode, bool fullscreen, bool noborde if ( numDisplays <= 0 ) { - Sys::Error( "SDL_GetNumVideoDisplays failed (%s)\n", SDL_GetError() ); + Sys::Error( "SDL_GetNumVideoDisplays failed: %s\n", SDL_GetError() ); } AssertCvarRange( r_displayIndex, 0, numDisplays - 1, true );