From f8ee893529f2a534c1b445ea9884913542cb327f Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Thu, 28 Sep 2023 12:29:06 +1000 Subject: [PATCH] - Move `I_GetEvent()` call into `GameInput::getInput()`. --- source/core/gameinput.cpp | 3 +++ source/core/mainloop.cpp | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/core/gameinput.cpp b/source/core/gameinput.cpp index 0e03a78ea..f82ccccfe 100644 --- a/source/core/gameinput.cpp +++ b/source/core/gameinput.cpp @@ -24,6 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "menu.h" #include "gamestate.h" #include "gameinput.h" +#include "g_input.h" #include "d_net.h" //--------------------------------------------------------------------------- @@ -355,6 +356,8 @@ void GameInput::processInputBits() void GameInput::getInput(const double scaleAdjust, InputPacket* packet) { + I_GetEvent(); + if (M_Active() || gamestate != GS_LEVEL) { inputBuffer = {}; diff --git a/source/core/mainloop.cpp b/source/core/mainloop.cpp index 6746f714e..d77cb490f 100644 --- a/source/core/mainloop.cpp +++ b/source/core/mainloop.cpp @@ -79,7 +79,6 @@ #include "v_video.h" #include "palette.h" #include "build.h" -#include "g_input.h" #include "mapinfo.h" #include "automap.h" #include "statusbar.h" @@ -136,7 +135,6 @@ void G_BuildTiccmd(ticcmd_t* cmd) savegamefile = ""; } cmd->ucmd = {}; - I_GetEvent(); gameInput.getInput(inputScale, &cmd->ucmd); cmd->consistency = consistency[myconnectindex][(maketic / ticdup) % BACKUPTICS]; } @@ -612,7 +610,6 @@ void TryRunTics (void) } if (!SyncInput()) { - I_GetEvent(); gameInput.getInput(inputScale); } return;