]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
radiant/console: rename Sys_LogFile to Sys_EnableLogFile 177/head
authorAntoine Fontaine <antoine.fontaine@epfl.ch>
Mon, 22 Mar 2021 01:30:26 +0000 (02:30 +0100)
committerAntoine Fontaine <antoine.fontaine@epfl.ch>
Wed, 24 Mar 2021 19:31:35 +0000 (20:31 +0100)
radiant/console.cpp
radiant/console.h
radiant/error.cpp
radiant/main.cpp
radiant/preferences.cpp

index 290e4429e5bda37e742a4e67f1eaa7fa441b02df..abb1def4655cb9fcb0c62ad3afbfdc2236dae0b7 100644 (file)
@@ -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 ) {
index 44d63f103605aee0cd4967db62a1d3e93a3cfb99..e7c703ed5aea377969fbdb2a0b4a0d61c68c3419 100644 (file)
@@ -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;
 
 
index 50a089645b43140b52fe2c8a311123dfdc34d98f..fbb77c2933b3c79fc6b0b53e2151d7a873933a71 100644 (file)
@@ -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 );
 }
index 83dc58f9d0a63616fb2b35c1039576282b2a65fa..ff141f6f529a436a3441584aa54ce9b5fc77d7c0 100644 (file)
@@ -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;
 }
index e57380eb1f3a32e071501d901b365762cb4fb417..b52fb73be5321c8cb99db21fe7d0667699b68bc0 100644 (file)
@@ -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);
        }
 };