r5sdk/r5dev/vgui/vgui_fpspanel.cpp
Kawe Mazidjatari fcf3a09418 Make singletons use static memory
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.
2024-04-05 17:52:57 +02:00

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);
}