From 504e8b19d5947d5201da9ec48d580a668016e4f0 Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Wed, 27 Oct 2021 21:20:03 +0300 Subject: [PATCH] Handle key input in vgui (#198) --- cl_dll/input.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cl_dll/input.cpp b/cl_dll/input.cpp index d0267f9b..d11abf56 100644 --- a/cl_dll/input.cpp +++ b/cl_dll/input.cpp @@ -380,7 +380,11 @@ Return 1 to allow engine to process the key, otherwise, act on it as needed ============ */ int DLLEXPORT HUD_Key_Event( int down, int keynum, const char *pszCurrentBinding ) -{ +{ +#if USE_VGUI + if (gViewPort) + return gViewPort->KeyInput(down, keynum, pszCurrentBinding); +#endif return 1; }