From 66a96af07fde03a90418e8bcff3c9dac4b804797 Mon Sep 17 00:00:00 2001 From: Unnamed Date: Tue, 2 Apr 2019 19:25:11 +0000 Subject: [PATCH] Paint.cpp: don't render VGUI with null graphics --- src/hooks/Paint.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/hooks/Paint.cpp b/src/hooks/Paint.cpp index 61ecbd14..c3bb51f0 100644 --- a/src/hooks/Paint.cpp +++ b/src/hooks/Paint.cpp @@ -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