get rid of mouse warping
This commit is contained in:
parent
96f0360d29
commit
6982abfba1
1 changed files with 0 additions and 11 deletions
|
@ -493,19 +493,8 @@ static void SdlDoEvent(const EventCallback &callbacks, SDL_Event &event)
|
|||
InputMouseButtonRelease(callbacks, SDL_GetTicks(), event.button.button);
|
||||
break;
|
||||
|
||||
// FIXME: check if this is only useful for the cursor
|
||||
// FIXME: if this is the case we don't need this.
|
||||
case SDL_MOUSEMOTION:
|
||||
InputMouseMove(callbacks, SDL_GetTicks(), event.motion.x, event.motion.y);
|
||||
// FIXME: Same bug fix from X11
|
||||
if ((UI.MouseWarpPos.x != -1 || UI.MouseWarpPos.y != -1)
|
||||
&& (event.motion.x != UI.MouseWarpPos.x || event.motion.y != UI.MouseWarpPos.y)) {
|
||||
int xw = UI.MouseWarpPos.x;
|
||||
int yw = UI.MouseWarpPos.y;
|
||||
UI.MouseWarpPos.x = -1;
|
||||
UI.MouseWarpPos.y = -1;
|
||||
SDL_WarpMouseInWindow(TheWindow, xw, yw);
|
||||
}
|
||||
break;
|
||||
|
||||
case SDL_WINDOWEVENT:
|
||||
|
|
Loading…
Add table
Reference in a new issue