Skip to content

Commit

Permalink
Fix performance alert variable argument list formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocaster committed Oct 20, 2015
1 parent 827a6dc commit 1c83229
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/xrEngine/GameFont.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ void __cdecl CGameFont::OutNext(LPCSTR fmt, ...)
MASTER_OUT(TRUE, FALSE, FALSE, TRUE, 0.0f, 0.0f, 1.0f, fmt);
};

void CGameFont::OutNextVA(const char *format, va_list args)
{ MasterOut(TRUE, FALSE, FALSE, TRUE, 0.0f, 0.0f, 1.0f, format, args); }

void CGameFont::OutSkip(float val)
{
fCurrentY += val*CurrentHeight_();
Expand Down
1 change: 1 addition & 0 deletions src/xrEngine/GameFont.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class ENGINE_API CGameFont
void OutI(float _x, float _y, LPCSTR fmt, ...);
void Out(float _x, float _y, LPCSTR fmt, ...);
void OutNext(LPCSTR fmt, ...);
void OutNextVA(const char *format, va_list args);
void OutSkip(float val = 1.f);

void OnRender();
Expand Down
2 changes: 1 addition & 1 deletion src/xrEngine/PerformanceAlert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void PerformanceAlert::Print(CGameFont &font, const char *format, ...)
font.SetHeightI(fontBaseSize*2);
va_list args;
va_start(args, format);
font.OutNext(format, args);
font.OutNextVA(format, args);
va_end(args);
alertPos = font.GetPosition();
font.SetColor(refColor);
Expand Down

0 comments on commit 1c83229

Please sign in to comment.