rennis250 / processing-rs

An implementation of Processing for the Rust programming language, with insipriation from openFrameworks and libCinder.
74 stars 7 forks source link

Mouse position resets to -100, -100 when not moving #7

Open Luminoth opened 3 years ago

Luminoth commented 3 years ago

I'm not sure if this is intentional or not, but if the mouse doesn't move, its position reverts to -100, -100. From

https://github.com/rennis250/processing-rs/blob/33e5c5b4abef16b6d27af6b27ec5b2d9892a732a/src/input.rs#L101

https://github.com/rennis250/processing-rs/blob/33e5c5b4abef16b6d27af6b27ec5b2d9892a732a/src/input.rs#L131

https://github.com/rennis250/processing-rs/blob/33e5c5b4abef16b6d27af6b27ec5b2d9892a732a/src/input.rs#L143

it's pretty clear why that's the case, but without any way (that I can see) to check if the mouse moved, that produces some unexpected results. Unless it's intended that we check for those magic numbers to know?

rennis250 commented 3 years ago

That's definitely a mistake. Thanks for the notice. I really need to push all my changes this weekend.