Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Possible mousewheel issue in OSX?

This thread is locked; no one can reply to it. rss feed Print
Possible mousewheel issue in OSX?
jmasterx
Member #11,410
October 2009

I don't know if this was present in Mavericks. I don't remember noticing it. But I now upgraded to Yosemite and I noticed XCode is able to scroll really tiny amounts when I mouse 1 tick of my mousewheel. In Windows this registers with a mouse.dz of +-1. Now when I run my game, If I scroll 1 tick at a time (1 click of the scroll wheel at a time) All I get is a MOUSE_MOVE with a dz of 0. My suspicion is that mouse.dz is tracked as an integer and I think OSX now has floating point level mousewheel tracking. I noticed if I scroll really fast it goes really fast unlike Windows. So Apple is clearly tinkering with scrolling at the OS level. So mouse.z and mouse.dz would probably have to become float or double to address this.

Thomas Fjellstrom
Member #476
June 2000
avatar

I think this was brought up before.. Allegro and many UI apis assume a dz change of like 110 or something along those lines. If it's less than that, I think allegro just goes "nope". but I think that was fixed in 5.1? Not 100% sure.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

jmasterx
Member #11,410
October 2009

I'm using 5.1.10 and I did not see anything relating to it in 5.1.11

Thomas Fjellstrom
Member #476
June 2000
avatar

Then I'm not sure... herm. Maybe it was only fixed in one specific platform, if at all? Or I'm just flat out wrong, but I could swear it was a thing that was looked into.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

SiegeLord
Member #7,827
October 2006
avatar

Try playing around with al_set_mouse_wheel_precision.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

jmasterx
Member #11,410
October 2009

Neat, that's new! Thanks.

Thomas Fjellstrom
Member #476
June 2000
avatar

If that does work, I think we should fix the mouse wheel not working out of the box though.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

SiegeLord
Member #7,827
October 2006
avatar

Yeah, could have the same sort of accumulator thing I wrote for Windows. I forget why I didn't do it for OSX, but clearly I didn't.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Thomas Fjellstrom
Member #476
June 2000
avatar

I was kindof wondering why it wasn't just put in as a generic bit of code in the mouse code rather than the drivers directly.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

SiegeLord
Member #7,827
October 2006
avatar

It just isn't, there's no larger reason. There is lot of duplicated code between the drivers, it's just how they were written.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Go to: