mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 02:11:19 +00:00
Con_Printf actually has a use after all: it prints to the console /only/ (no redirects, etc)
This commit is contained in:
parent
2b81eaea6c
commit
1a307e306f
3 changed files with 16 additions and 1 deletions
|
@ -89,6 +89,7 @@ extern struct console_data_s con_data;
|
|||
void Con_CheckResize (void);
|
||||
void Con_DrawConsole (void);
|
||||
|
||||
VISIBLE void Con_Printf (const char *fmt, ...);
|
||||
void Con_Print (const char *fmt, va_list args);
|
||||
void Con_ToggleConsole_f (void);
|
||||
|
||||
|
|
|
@ -133,6 +133,19 @@ Con_Shutdown (void)
|
|||
}
|
||||
}
|
||||
|
||||
VISIBLE void
|
||||
Con_Printf (const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start (args, fmt);
|
||||
if (con_module)
|
||||
con_module->functions->console->pC_Print (fmt, args);
|
||||
else
|
||||
vfprintf (stdout, fmt, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
VISIBLE void
|
||||
Con_Print (const char *fmt, va_list args)
|
||||
{
|
||||
|
|
|
@ -43,6 +43,7 @@ static __attribute__ ((used)) const char rcsid[] =
|
|||
#include <time.h>
|
||||
|
||||
#include "QF/cvar.h"
|
||||
#include "QF/console.h"
|
||||
#include "QF/dstring.h"
|
||||
#include "QF/msg.h"
|
||||
#include "QF/sound.h" // FIXME: DEFAULT_SOUND_PACKET_*
|
||||
|
@ -233,7 +234,7 @@ SV_Print (const char *fmt, va_list args)
|
|||
pending = 0;
|
||||
}
|
||||
|
||||
Sys_Printf ("%s", msg2); // also echo to debugging console
|
||||
Con_Printf ("%s", msg2); // also echo to debugging console
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue