From a681b5b706099aff1a8ab4a10095aae67d00c97f Mon Sep 17 00:00:00 2001 From: ZZYZX Date: Tue, 7 Mar 2017 10:43:30 +0200 Subject: [PATCH] Just in case, don't send useless mouse move events to G_Responder. --- src/d_main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/d_main.cpp b/src/d_main.cpp index 984121fee..ac423d10b 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -260,7 +260,7 @@ static int pagetic; // [ZZ] this handles the mouse changes in the playsim. // I have no idea why it had to be done before events are dispatched... also no idea why is this not in G_Responder or something. -static void D_ProcessMouseForPlaysim(event_t *ev) +static bool D_ProcessMouseForPlaysim(event_t *ev) { //if (ev->type == EV_Mouse && !paused && menuactive == MENU_Off && ConsoleState != c_down && ConsoleState != c_falling && !E_CheckUiProcessors()) if (ev->type == EV_Mouse && !paused) // [ZZ] the other checks are replaced with responders eating the event. @@ -280,9 +280,11 @@ static void D_ProcessMouseForPlaysim(event_t *ev) } if ((events[eventhead].x | events[eventhead].y) == 0) { - return; + return false; } } + + return true; } void D_ProcessEvents (void) @@ -318,8 +320,8 @@ void D_ProcessEvents (void) if (E_Responder(ev)) // [ZZ] ZScript ate the event continue; // before passing this further, do some magic - D_ProcessMouseForPlaysim(ev); - G_Responder (ev); + if (D_ProcessMouseForPlaysim(ev)) + G_Responder (ev); } }