]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - console.c
added Sys_PrintfToTerminal function for convenience, this replaces
[xonotic/darkplaces.git] / console.c
index 537cdc72019ced668af841aa9e8fbed16c153b2b..769ae2f6adfff44981d27f9af678f5784615fcd8 100644 (file)
--- a/console.c
+++ b/console.c
@@ -814,7 +814,6 @@ static void Con_PrintToHistory(const char *txt, int mask)
        if(!con.text) // FIXME uses a non-abstracted property of con
                return;
 
-       if (con_mutex) Thread_LockMutex(con_mutex);
        for(; *txt; ++txt)
        {
                if(cr_pending)
@@ -845,7 +844,6 @@ static void Con_PrintToHistory(const char *txt, int mask)
                                break;
                }
        }
-       if (con_mutex) Thread_UnlockMutex(con_mutex);
 }
 
 /*! The translation table between the graphical font and plain ASCII  --KB */
@@ -1535,7 +1533,7 @@ static float Con_WordWidthFunc(void *passthrough, const char *w, size_t *length,
                return DrawQ_TextWidth(w, *length, ti->fontsize, ti->fontsize, false, ti->font);
        else
        {
-               printf("Con_WordWidthFunc: can't get here (maxWidth should never be %f)\n", maxWidth);
+               Sys_PrintfToTerminal("Con_WordWidthFunc: can't get here (maxWidth should never be %f)\n", maxWidth);
                // Note: this is NOT a Con_Printf, as it could print recursively
                return 0;
        }