mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-02-17 20:31:57 -05:00
OSX: Fixed debug output to print on single line.
This commit is contained in:
parent
1d1e78977f
commit
8f1aae57b5
1 changed files with 13 additions and 3 deletions
16
src/bgfx.cpp
16
src/bgfx.cpp
|
@ -42,8 +42,18 @@ namespace bgfx
|
|||
|
||||
virtual void traceVargs(const char* _filePath, uint16_t _line, const char* _format, va_list _argList) BX_OVERRIDE
|
||||
{
|
||||
dbgPrintf("%s (%d): ", _filePath, _line);
|
||||
dbgPrintfVargs(_format, _argList);
|
||||
char temp[2048];
|
||||
char* out = temp;
|
||||
int32_t len = bx::snprintf(out, sizeof(temp), "%s (%d): ", _filePath, _line);
|
||||
int32_t total = len + bx::vsnprintf(out + len, sizeof(temp)-len, _format, _argList);
|
||||
if ( (int32_t)sizeof(temp) < total)
|
||||
{
|
||||
out = (char*)alloca(total+1);
|
||||
memcpy(out, temp, len);
|
||||
bx::vsnprintf(out + len, total-len, _format, _argList);
|
||||
}
|
||||
out[total] = '\0';
|
||||
bx::debugOutput(out);
|
||||
}
|
||||
|
||||
virtual void fatal(Fatal::Enum _code, const char* _str) BX_OVERRIDE
|
||||
|
@ -1621,7 +1631,7 @@ again:
|
|||
}
|
||||
else
|
||||
{
|
||||
#if 1
|
||||
#if 0
|
||||
if (s_rendererCreator[RendererType::Metal].supported)
|
||||
{
|
||||
_type = RendererType::Metal;
|
||||
|
|
Loading…
Reference in a new issue