mirror of
https://github.com/alexbatalov/fallout1-ce.git
synced 2024-10-02 21:02:03 +00:00
Fix mouse events processing (#55)
This commit is contained in:
parent
dd9ca29939
commit
fcb872cff7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user