r5sdk/r5dev/vgui/vgui_fpspanel.cpp
Kawe Mazidjatari 9c440e1e68 Overlay log system cleanup
* Use single static buffer instead of each overlay having its own (its only used in the material system thread).
* Improved readability by using ternary operators and c++ style casts.
2022-10-26 01:55:36 +02:00

32 lines
874 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_pOverlay->Update();
return CFPSPanel_Paint(thisptr);
}
///////////////////////////////////////////////////////////////////////////////
void CFPSPanel_Attach()
{
DetourAttach((LPVOID*)&CFPSPanel_Paint, &HCFPSPanel_Paint);
}
void CFPSPanel_Detach()
{
DetourDetach((LPVOID*)&CFPSPanel_Paint, &HCFPSPanel_Paint);
}