winit
winit copied to clipboard
MouseMotion event returns absolute instead of relative values, when running Linux in a VM
I'm listening for glutin::DeviceEvent::MouseMotion{delta:(xrel, yrel)}
and it works fine on most systems, but Ubuntu 18.04.1 in VMware Fusion causes xrel
and yrel
to be set to large absolute values as the mouse moves, for example:
MouseMotion 39128.40293884277 25325.613555908203 MouseMotion 39128.40293884277 25371.612854003906 MouseMotion 39128.40293884277 25416.6121673584
instead of the expected relative delta values. When implementing mouse look in a game using this event, this causes the player to rapidly spin instead of look where their mouse is pointing. SDL2 has similar issues: https://bugzilla.libsdl.org/show_bug.cgi?id=2150 https://bugzilla.libsdl.org/show_bug.cgi?id=2954 https://stackoverflow.com/questions/25576438/sdl-getrelativemousestate-strange-behaviour, but there is an option to enable a "relative mode warp" hint in SDL2, does/could Glutin have something similar?