Fix MouseButtonStates for mouse events in CIrrDeviceSDL when middle or right button are released

Needed to use bitwise not instead of logical not to clear bits for EMBSM_RIGHT and EMBSM_MIDDLE.
Thanks @gcc for it's warnings


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6423 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien 2022-09-22 21:34:08 +00:00
parent 88b7bed20f
commit a69969d6f9

@ -335,7 +335,7 @@ bool CIrrDeviceSDL::run()
else else
{ {
irrevent.MouseInput.Event = irr::EMIE_RMOUSE_LEFT_UP; irrevent.MouseInput.Event = irr::EMIE_RMOUSE_LEFT_UP;
MouseButtonStates &= !irr::EMBSM_RIGHT; MouseButtonStates &= ~irr::EMBSM_RIGHT;
} }
break; break;
@ -348,7 +348,7 @@ bool CIrrDeviceSDL::run()
else else
{ {
irrevent.MouseInput.Event = irr::EMIE_MMOUSE_LEFT_UP; irrevent.MouseInput.Event = irr::EMIE_MMOUSE_LEFT_UP;
MouseButtonStates &= !irr::EMBSM_MIDDLE; MouseButtonStates &= ~irr::EMBSM_MIDDLE;
} }
break; break;