diff --git a/src/plib/gnw/dxinput.cc b/src/plib/gnw/dxinput.cc index ffd0e69..b696527 100644 --- a/src/plib/gnw/dxinput.cc +++ b/src/plib/gnw/dxinput.cc @@ -76,6 +76,14 @@ bool dxinput_unacquire_mouse() // 0x4E053C bool dxinput_get_mouse_state(MouseData* mouseState) { + // CE: This function is sometimes called outside loops calling `get_input` + // and subsequently `GNW95_process_message`, so mouse events might not be + // handled by SDL yet. + // + // TODO: Move mouse events processing into `GNW95_process_message` and + // update mouse position manually. + SDL_PumpEvents(); + if (gLastInputType == INPUT_TYPE_TOUCH) { mouseState->x = gTouchMouseDeltaX; mouseState->y = gTouchMouseDeltaY;