Fix mouse buttons not working in menus with alwaysgrabmouse on

This commit fixes #1257 by reintroducing something left out in commit
9f116c7c9e. From my testing, it looks
look the behavior is the exact same regarding the lua hook script that
the original commit was fixing (#879).
This commit is contained in:
Refrag 2024-05-19 09:08:00 +02:00
parent 47bcad4ab1
commit ccadfd8157
No known key found for this signature in database
GPG key ID: AD08F6A1C3E283FD

View file

@ -382,6 +382,8 @@ static INT32 Impl_SDL_Scancode_To_Keycode(SDL_Scancode code)
static boolean ShouldIgnoreMouse(void)
{
if (cv_alwaysgrabmouse.value)
return false;
if (menuactive)
return !M_MouseNeeded();
if (paused || con_destlines || chat_on)