mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- debugprintf
This commit is contained in:
parent
6d40c9202c
commit
caa450dcb9
2 changed files with 19 additions and 0 deletions
|
@ -2061,3 +2061,20 @@ int32_t handleevents(void)
|
|||
}
|
||||
|
||||
auto vsnprintfptr = vsnprintf; // This is an inline in Visual Studio but we need an address for it to satisfy the MinGW compiled libraries.
|
||||
|
||||
//
|
||||
// debugprintf() -- sends a debug string to the debugger
|
||||
//
|
||||
void debugprintf(const char* f, ...)
|
||||
{
|
||||
va_list va;
|
||||
char buf[1024];
|
||||
|
||||
if (!IsDebuggerPresent()) return;
|
||||
|
||||
va_start(va, f);
|
||||
Bvsnprintf(buf, 1024, f, va);
|
||||
va_end(va);
|
||||
|
||||
OutputDebugStringA(buf);
|
||||
}
|
||||
|
|
|
@ -69,3 +69,5 @@ inline void buildputs(const char *s)
|
|||
{
|
||||
PrintString(PRINT_HIGH, s);
|
||||
}
|
||||
|
||||
void debugprintf(const char* f, ...); // Prints to the debugger's log.
|
||||
|
|
Loading…
Reference in a new issue