wgois / OIS

Official OIS repository. Object oriented Input System
https://wgois.github.io/OIS/
zlib License
257 stars 86 forks source link

Non-Exclusive X11 Linux Mouse Is Offset #93

Open VENTDEV opened 8 months ago

VENTDEV commented 8 months ago

Describe the bug This is a bug that I fixed in my own custom implementation of OIS back in 2013 or so. Giving the latest master a try, it remains.

On X11 Linux non-exclusive mouse (native/hardware mouse), the OS and ingame mouse positions are offset.

Software Mouse works perfectly fine.

Incorrect The tip of the yellow arrow is where the game thinks the mouse is. The mouse cursor is the location of the hardware mouse.

To Reproduce Compile the latest master for Linux. Create an Ogre3d SDL window. Use OIS in non-exclusive/hidden mouse mode. You'll find that the mouse positions don't match.

Expected behavior The tip of the hardware mouse and the mouse position in the renderer window should match.

Correct After my code fix, the two are aligned properly.

Platform (please complete the following information):

Additional context I already implemented a fix for this. I am not sure if the code quality is up to standard. It probably can be handled better/prettier. But I will put what I am using in a pull request anyway.