olofson / eel

The Extensible Embeddable Language for scripting in realtime applications
http://eelang.org/
zlib License
46 stars 4 forks source link

Implement SDL_SetRelativeMouseMode() #133

Open olofson opened 4 years ago

olofson commented 4 years ago

The old SDL_SetWindowGrab()/SDL_WarpMouse()/relative mouse move method is unreliable and broken on some platforms. We should wrap the new SDL_SetRelativeMouseMode() call instead, which supposedly does this in a proper, portable way.

The HScale and VScale widgets in the Eelium GUI needs to use this new method, as they're currently unusable in some environments.

olofson commented 4 years ago

Unfortunately, SDL_SetRelativeMouseMode() seems to be broken under Linux, be it WSL Ubuntu 18.04/Xming, or Ubuntu 18.04/VMWare. I thought it was an issue that was fixed around 2.0.9, but 2.0.13.hg-0:aaaaaaaaaaah.0 has the exact same issue on WSL, as does Ubuntu 20.04/VMWare with SDL 2.0.10.hg-12952:bc90ce38f1e2.12952.