Fix mouse button presses
This commit is contained in:
parent
6f3afc1961
commit
148748a27e
|
|
@ -558,6 +558,9 @@ void PollInputEvents(void)
|
||||||
CORE.Input.Keyboard.keyRepeatInFrame[i] = 0;
|
CORE.Input.Keyboard.keyRepeatInFrame[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Register previous mouse states
|
||||||
|
for (int i = 0; i < MAX_MOUSE_BUTTONS; i++) CORE.Input.Mouse.previousButtonState[i] = CORE.Input.Mouse.currentButtonState[i];
|
||||||
|
|
||||||
// Poll input events for current plaform
|
// Poll input events for current plaform
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
/*
|
/*
|
||||||
|
|
@ -613,7 +616,10 @@ void PollInputEvents(void)
|
||||||
{
|
{
|
||||||
CORE.Input.Mouse.currentButtonState[event.button.button - 1] = 1;
|
CORE.Input.Mouse.currentButtonState[event.button.button - 1] = 1;
|
||||||
} break;
|
} break;
|
||||||
case SDL_MOUSEBUTTONUP: break;
|
case SDL_MOUSEBUTTONUP:
|
||||||
|
{
|
||||||
|
CORE.Input.Mouse.currentButtonState[event.button.button - 1] = 0;
|
||||||
|
} break;
|
||||||
case SDL_MOUSEWHEEL:
|
case SDL_MOUSEWHEEL:
|
||||||
{
|
{
|
||||||
CORE.Input.Mouse.currentWheelMove.x = (float)event.wheel.x;
|
CORE.Input.Mouse.currentWheelMove.x = (float)event.wheel.x;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user