Paint.cpp: don't render VGUI with null graphics

This commit is contained in:
Unnamed 2019-04-02 19:25:11 +00:00 committed by TotallyNotElite
parent 85a4502720
commit 66a96af07f

View File

@ -20,7 +20,11 @@ DEFINE_HOOKED_METHOD(Paint, void, IEngineVGui *this_, PaintMode_t mode)
{
if (!isHackActive())
{
#if !ENABLE_NULL_GRAPHICS
return original::Paint(this_, mode);
#else
return;
#endif
}
if (!g_IEngine->IsInGame())
@ -89,7 +93,8 @@ DEFINE_HOOKED_METHOD(Paint, void, IEngineVGui *this_, PaintMode_t mode)
// Call all paint functions
EC::run(EC::Paint);
}
#if !ENABLE_NULL_GRAPHICS
return original::Paint(this_, mode);
#endif
}
} // namespace hooked_methods