commit d66009a89528c4a8686319a7e6b1975383187080
Author: Michael Day <43701387+mikeday0@users.noreply.github.com>
AuthorDate: Thu Jan 26 02:38:01 2023 -0500
Commit: GitHub <noreply@github.com>
CommitDate: Thu Jan 26 08:38:01 2023 +0100
doom: Fix mouse event causing unwanted key press (#1570)
If a particular in-game action and an in-menu action share a common
keybind, then the mouse event which also causes that in-menu action will
trigger the in-game action when outside of the menus. Add check to
prevent this from happening.
---
src/doom/m_menu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/doom/m_menu.c b/src/doom/m_menu.c
index baf01e33..073b8a12 100644
--- a/src/doom/m_menu.c
+++ b/src/doom/m_menu.c
@@ -1478,7 +1478,7 @@ boolean M_Responder (event_t* ev)
}
else
{
- if (ev->type == ev_mouse && mousewait < I_GetTime())
+ if (ev->type == ev_mouse && mousewait < I_GetTime() && menuactive)
{
mousey += ev->data3;
if (mousey < lasty-30)