Skip to content

Commit 1c83229

Browse files
author
nitrocaster
committed
Fix performance alert variable argument list formatting.
1 parent 827a6dc commit 1c83229

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/xrEngine/GameFont.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ void __cdecl CGameFont::OutNext(LPCSTR fmt, ...)
327327
MASTER_OUT(TRUE, FALSE, FALSE, TRUE, 0.0f, 0.0f, 1.0f, fmt);
328328
};
329329

330+
void CGameFont::OutNextVA(const char *format, va_list args)
331+
{ MasterOut(TRUE, FALSE, FALSE, TRUE, 0.0f, 0.0f, 1.0f, format, args); }
332+
330333
void CGameFont::OutSkip(float val)
331334
{
332335
fCurrentY += val*CurrentHeight_();

src/xrEngine/GameFont.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ class ENGINE_API CGameFont
101101
void OutI(float _x, float _y, LPCSTR fmt, ...);
102102
void Out(float _x, float _y, LPCSTR fmt, ...);
103103
void OutNext(LPCSTR fmt, ...);
104+
void OutNextVA(const char *format, va_list args);
104105
void OutSkip(float val = 1.f);
105106

106107
void OnRender();

src/xrEngine/PerformanceAlert.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ void PerformanceAlert::Print(CGameFont &font, const char *format, ...)
1212
font.SetHeightI(fontBaseSize*2);
1313
va_list args;
1414
va_start(args, format);
15-
font.OutNext(format, args);
15+
font.OutNextVA(format, args);
1616
va_end(args);
1717
alertPos = font.GetPosition();
1818
font.SetColor(refColor);

0 commit comments

Comments
 (0)