Fixed a bug when GUI elements ate keystrokes even when hidden
This commit is contained in:
parent
8111cde47f
commit
d7c86c6ae9
@ -87,7 +87,7 @@ CUserCmd* GetUserCmd_hook(IInput* thisptr, int sequence_number) {
|
|||||||
|
|
||||||
int IN_KeyEvent_hook(void* thisptr, int eventcode, int keynum, const char* pszCurrentBinding) {
|
int IN_KeyEvent_hook(void* thisptr, int eventcode, int keynum, const char* pszCurrentBinding) {
|
||||||
SEGV_BEGIN;
|
SEGV_BEGIN;
|
||||||
if (g_pGUI->ConsumesKey((ButtonCode_t)keynum)) {
|
if (g_pGUI->ConsumesKey((ButtonCode_t)keynum) && g_pGUI->Visible()) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return ((IN_KeyEvent_t*)hooks::hkClient->GetMethod(hooks::offKeyEvent))(thisptr, eventcode, keynum, pszCurrentBinding);
|
return ((IN_KeyEvent_t*)hooks::hkClient->GetMethod(hooks::offKeyEvent))(thisptr, eventcode, keynum, pszCurrentBinding);
|
||||||
|
Reference in New Issue
Block a user