mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Avoid heap memory allocation and a level of indirection. This allows the compiler to optimize the program even more. No logic has been changed in this patch.
27 lines
812 B
C++
27 lines
812 B
C++
//===========================================================================//
|
|
//
|
|
// Purpose: Framerate indicator panel.
|
|
//
|
|
// $NoKeywords: $
|
|
//===========================================================================//
|
|
|
|
#include "core/stdafx.h"
|
|
#include "tier1/cvar.h"
|
|
#include "vgui/vgui_fpspanel.h"
|
|
#include "vgui/vgui_debugpanel.h"
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose:
|
|
//-----------------------------------------------------------------------------
|
|
ConVar* HCFPSPanel_Paint(void* thisptr)
|
|
{
|
|
g_TextOverlay.Update();
|
|
return CFPSPanel__Paint(thisptr);
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
void VFPSPanel::Detour(const bool bAttach) const
|
|
{
|
|
DetourSetup(&CFPSPanel__Paint, &HCFPSPanel_Paint, bAttach);
|
|
}
|