]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/console.cpp
also support -sRGBcolor for floodlight
[xonotic/netradiant.git] / radiant / console.cpp
index ad282f16e5b787bdabdadfe49ef0256c9aaece28..cff963f21b5c778f0f5acbaf28e2e039540c46d1 100644 (file)
@@ -54,6 +54,8 @@ void Sys_LogFile(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])
+               return; // cannot open a log file yet
     // open a file to log the console (if user prefs say so)
     // the file handle is g_hLogFile
     // the log file is erased
@@ -187,11 +189,10 @@ std::size_t Sys_Print(int level, const char* buf, std::size_t length)
 
       const GdkColor yellow = { 0, 0xb0ff, 0xb0ff, 0x0000 };
       const GdkColor red = { 0, 0xffff, 0x0000, 0x0000 };
-      const GdkColor black = { 0, 0x0000, 0x0000, 0x0000 };
 
       static GtkTextTag* error_tag = gtk_text_buffer_create_tag (buffer, "red_foreground", "foreground-gdk", &red, 0);
       static GtkTextTag* warning_tag = gtk_text_buffer_create_tag (buffer, "yellow_foreground", "foreground-gdk", &yellow, 0);
-      static GtkTextTag* standard_tag = gtk_text_buffer_create_tag (buffer, "black_foreground", "foreground-gdk", &black, 0);
+      static GtkTextTag* standard_tag = gtk_text_buffer_create_tag (buffer, "black_foreground", 0);
       GtkTextTag* tag;
       switch (level)
       {
@@ -214,7 +215,7 @@ std::size_t Sys_Print(int level, const char* buf, std::size_t length)
         if(!globalCharacterSet().isUTF8())
         {
           BufferedTextOutputStream<GtkTextBufferOutputStream> buffered(textBuffer);
-          buffered << ConvertLocaleToUTF8(StringRange(buf, buf + length));
+          buffered << StringRange(buf, buf + length);
         }
         else
         {