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