Closed DanielGibson closed 8 years ago
This might be an SDL big we fixed around the time of 2.0.4 shipping.
Bug, not "big"
nope, it also happens with SDL-hg from April 14th
Hmm, okay.
Yeah, I get this too. One "click" of the wheel doesn't trigger a weapon switch at all. Every 5th seems about right.
I don't have this in front of me, but it's likely I'm not converting from SDL to Win32 properly, I think SDL wants this to move by 1 on each wheel click, but Win32 wants it to move like by 120 or something, and we're trying (perhaps incorrectly) to emulate that...Win32 assumes you can move the mouse less than one click for higher-resolution wheels, so it's not surprising that the engine can build up to what it thinks is a "click" with multiple rolls of the wheel.
If you're bored, look for SDL_MOUSEWHEEL and see if I report the value incorrectly. I'll take a closer look if no one beats me to it.
I think I'll look into it over the weekend
I took some time to write what I found out about this issue in the PR #42.
I checked the other instances of SDL_MOUSEWHEEL and they seem to be reporting the values correctly.
Only every 5th try or so.
Haven't debugged that at all yet, just want to mention it here so it's not forgotten.