From 0b1f60f28f95e7ed12fea4ed1dc3e30588f2a2ed Mon Sep 17 00:00:00 2001 From: Antoine Fontaine Date: Mon, 22 Mar 2021 02:30:26 +0100 Subject: [PATCH] radiant/console: rename Sys_LogFile to Sys_EnableLogFile --- radiant/console.cpp | 4 ++-- radiant/console.h | 2 +- radiant/error.cpp | 2 +- radiant/main.cpp | 8 ++++---- radiant/preferences.cpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/radiant/console.cpp b/radiant/console.cpp index 290e4429..abb1def4 100644 --- a/radiant/console.cpp +++ b/radiant/console.cpp @@ -54,7 +54,7 @@ struct Gtk_Idle_Print_Data { }; // called whenever we need to open/close/check the console log file -void Sys_LogFile( bool enable ){ +void Sys_EnableLogFile( bool enable ){ if ( enable && !g_hLogFile ) { // settings say we should be logging and we don't have a log file .. so create it if ( !SettingsPath_get()[0] ) { @@ -221,7 +221,7 @@ std::size_t Sys_Print( int level, const char* buf, std::size_t length ){ bool contains_newline = std::find( buf, buf + length, '\n' ) != buf + length; if ( level == SYS_ERR ) { - Sys_LogFile( true ); + Sys_EnableLogFile( true ); } if ( g_hLogFile != 0 ) { diff --git a/radiant/console.h b/radiant/console.h index 44d63f10..e7c703ed 100644 --- a/radiant/console.h +++ b/radiant/console.h @@ -40,7 +40,7 @@ ui::Widget Console_constructWindow( ui::Window toplevel ); std::size_t Sys_Print( int level, const char* buf, std::size_t length ); // will open/close the log file based on the parameter -void Sys_LogFile( bool enable ); +void Sys_EnableLogFile( bool enable ); extern bool g_Console_enableLogging; diff --git a/radiant/error.cpp b/radiant/error.cpp index 50a08964..fbb77c29 100644 --- a/radiant/error.cpp +++ b/radiant/error.cpp @@ -130,7 +130,7 @@ void Error( const char *error, ... ){ ERROR_MESSAGE( text ); // force close logging if necessary - Sys_LogFile( false ); + Sys_EnableLogFile( false ); _exit( 1 ); } diff --git a/radiant/main.cpp b/radiant/main.cpp index 83dc58f9..ff141f6f 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -407,7 +407,7 @@ void create_global_pid(){ // set without saving, the class is not in a coherent state yet // just do the value change and call to start logging, CGamesDialog will pickup when relevant g_GamesDialog.m_bForceLogConsole = true; - Sys_LogFile( true ); + Sys_EnableLogFile( true ); } // create a primary .pid for global init run @@ -466,7 +466,7 @@ void create_local_pid(){ // force console logging on! (will go in prefs too) g_GamesDialog.m_bForceLogConsole = true; - Sys_LogFile( true ); + Sys_EnableLogFile( true ); } else { @@ -600,7 +600,7 @@ int main( int argc, char* argv[] ){ // we may have the console turned on and want to keep it that way // so we use a latching system if ( g_GamesDialog.m_bForceLogConsole ) { - Sys_LogFile( true ); + Sys_EnableLogFile( true ); g_Console_enableLogging = true; g_GamesDialog.m_bForceLogConsole = false; } @@ -654,7 +654,7 @@ int main( int argc, char* argv[] ){ Radiant_Shutdown(); // close the log file if any - Sys_LogFile( false ); + Sys_EnableLogFile( false ); return EXIT_SUCCESS; } diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index e57380eb..b52fb73b 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -220,7 +220,7 @@ struct LogConsole { static void Import(bool value) { g_Console_enableLogging = value; - Sys_LogFile(g_Console_enableLogging); + Sys_EnableLogFile(g_Console_enableLogging); } }; -- 2.39.2