Hedgewars goes crazy with custom mouse sensitivity
Thu, 2017-09-07 07:33
I have this script that i run during login to set custom mouse sensitivity:
xinput --set-prop 12 "Coordinate Transformation Matrix" 1.65 0 0 0 1.65 0 0 0 1
However, now Hedgewars thinks I have insane mouse sensitivity, if I move a mouse a tiny bit, it moves the camera through the whole map or uncountable copies of the map in case of repeating map.
In the end we get that data from X via SDL.
Maybe you could try in latest dev to see if SDL2 is handling that better?
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
I've just pulled latest revision and rebuilt the game. Same problem. Hmm, strange, another SDL game - Xonotic - works fine.
My stuff
https://hg.hedgewars.org/hedgewars/file/89423b1db329/hedgewars/uMisc.pas#l49
welp. there's the SDL call.
It could be that the other game has sanity caps on dx/dy.
You could add some logging there to see what SDL is giving us. My guess is the values are enormous.
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
So I set it to identity matrix and everything works fine, but when I set it to say 1.1, mouse gets broken, the higher the value, the more broken it gets.
My stuff
Lyberta: Are you sure you used the SDL version of Xonotic?
Xonotic has two modes: GLX and SDL: xonotic-glx and xonotic-sdl.
Hi, I am a Hedgewars developer.
OK. I was now able to reproduce this. I was just too stupd to use xinput.
I'm trying now to debug this.
Hi, I am a Hedgewars developer.
Interesting. I wonder what the actual bug is.
Oh btw. Xonotic GLX is broken with custom mouse sensitivity. I have to use SDL.
Yes, you read that right. Hedgewars SDL and Xonotic GLX are broken. Xonotic SDL is not.
My stuff
Sorry to say this, but I am still too puzzled about this bug.
I just can't find the cause of it.
Hi, I am a Hedgewars developer.
For your interest: Ths bug is tracked here:
http://issues.hedgewars.org/show_bug.cgi?id=512
As we don't know a real solution yet, maybe try to find a workaround? Is xinput the only way you can change your mouse speed?
Can you list the available properties of xinput? I read somewhere there's another property to change the mouse speed.
If --list-props shows you “Device Accel Constant Deceleration”, try to go with that one instead.
Hi, I am a Hedgewars developer.
No, I don't have that one.
My stuff
I have looked again into that and have decided to rework the mouse code a bit.
I finally managed to fix the bug you reported, the camera now works normally with any xinput value.
However, this is only a partial fix. Another, smaller, issue popped up:
If you enter the Quit or Pause menu, and move the mouse, the cursor jumps once. This can be annoying, but it is no longer game-breaking.
https://issues.hedgewars.org/show_bug.cgi?id=538
Hi, I am a Hedgewars developer.
Ok, now I can at least move the camera. But now selecting weapons is very hard. I have 1.7 sensitivity in xinput and I think the mouse in weapon selection moves 1.7 times faster than on desktop.
I have reported it here: https://issues.hedgewars.org/show_bug.cgi?id=185 but maybe it deserves a separate bug. Weapon selection sensitivity should match desktop sensitivity.
My stuff