From 2b06fb1a6d83f290db0fddd280a1fa5a5dfba0fa Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Mon, 28 Oct 2019 21:04:05 +0100 Subject: [PATCH] Update mouse movment before rendering Fixes #379 --- Source/diablo.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 788092ef5..f14fb9875 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -119,6 +119,22 @@ BOOL StartGame(BOOL bNewGame, BOOL bSinglePlayer) return gbRunGameResult; } +static void ProcessInput() +{ + if (PauseMode == 2) { + return; + } + if (gbMaxPlayers == 1 && gmenu_exception()) { + drawpanflag |= 1; + return; + } + + if (!gmenu_exception() && sgnTimeoutCurs == 0) { + CheckCursMove(); + track_process(); + } +} + void run_game_loop(unsigned int uMsg) { BOOL bLoop; @@ -160,6 +176,7 @@ void run_game_loop(unsigned int uMsg) continue; } } else if (!nthread_has_500ms_passed(FALSE)) { + ProcessInput(); DrawAndBlit(); continue; }