same issue than before, but with Linux this time. The mouse will not be possible to force to a position on both X and Y axis. So I followed the thread from before and it seems that SDL 2.0.4 is not available for Linux for now.
Do you know some solution to fix this ?
Thanks a lot in advance !
It always depends on the Linux distribution, but for Ubuntu, SDL 2.0.4 will be available in the 16.04 update. So at least there is a solution on the horizon... :)
And you can always manually install SDL 2.0.4 from source, by using the
./configure && make && sudo make install dance, but I have never done that on Ubuntu and I don't know if Gosu would pick up the custom SDL installation by default.
Also, I'm not sure if I remember the issue correctly, but I think you cannot set both
mouse_y in the same tick before SDL 2.0.4, right? Wouldn't it work well enough if you set
mouse_x in every even frame, and
mouse_y in every odd frame? Or you only reset the value which has moved the furthest from the screen centre? Ugly hacks and gamedev go hand in hand ;)
I think I remember to have tried using only one axis and it didn't work. And update is proposed to Ubuntu 15.10 now, not the 16 :(
Your solution is really ugly in some way, but I like it, so I'll try it ! I'll let you know.
Hey bestguigui, good and bad news if you are still waiting for a fix here.
Ubuntu 16.04 ships with SDL 2.0.4. But only on Linux, the new SDL_GetGlobalMouseState is (practically) broken. SDL 2.0.5 will fix this, but since 2.0.3->2.0.4 took over a year, I'm not holding my breath.
So what I did is try to improve the mouse logic so that your mousing code works on all versions of Linux. The only limitation is that I still cannot update
mouse_y while the mouse is outside the window.
In any case, the hack I've suggested above is not necessary anymore.
Glad to hear that ! In any case, I switched to windows 10 (not that I asked for it... my computer was displaying it one evening, the brand new desktop).
But I will switch back to windows 7 in a couple of days, because of hardware issues. It's still good to know that mouse will work better on Linux because I'm planning to try to create something that uses the mouse a lot :)
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill