Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: trithilon on August 22, 2022, 06:46:53 PM

Title: Is it possible to detect mouse-wheel turn in a native/console application?
Post by: trithilon on August 22, 2022, 06:46:53 PM
I am making games using raylib on piCore. They work fine - I am able to detect right, left and center mouse buttons along with movement. But wheel turns don't register. Is it impossible? Or is it a problem with raylib and I should take it up with them?

Cheers :)
Title: Re: Is it possible to detect mouse-wheel turn in a native/console application?
Post by: Rich on August 22, 2022, 08:21:27 PM
Hi trithilon
Does this not work:
https://blog.weghos.com/raylib/raylib/examples/core/core_input_mouse_wheel.c.html
Title: Re: Is it possible to detect mouse-wheel turn in a native/console application?
Post by: trithilon on August 23, 2022, 12:44:15 AM
No it doesn't. Hence this thread. None of the examples with mousewheel seem to work.
I've filed and issue with raylib as well... but they creator isn't sure if there is a driver or something which can listen to that input.
https://github.com/raysan5/raylib/issues/2660
I am wondering how is it possible the X can listen to scroll but console cannot.
Title: Re: Is it possible to detect mouse-wheel turn in a native/console application?
Post by: patrikg on August 23, 2022, 12:50:38 AM
Maybe you can use xinput program to test/debug the wheel functionality ?

Code: (bash) [Select]
xinput list --long
Title: Re: Is it possible to detect mouse-wheel turn in a native/console application?
Post by: curaga on August 23, 2022, 01:21:48 AM
Commented on that github issue, but yeah, it's all raylib. /dev/mouse supports wheels if the app requests it, and X is not needed to use evdev nodes, which support as many buttons as mice can possibly have.
Title: Re: Is it possible to detect mouse-wheel turn in a native/console application?
Post by: Rich on August 23, 2022, 01:24:49 AM
Hi trithilon
Does this help:
https://forums.raspberrypi.com/viewtopic.php?t=30762#p267522
Title: Re: Is it possible to detect mouse-wheel turn in a native/console application?
Post by: Rich on August 23, 2022, 02:04:44 AM
Hi trithilon
I noticed the example I linked to in reply #1 returns an int, but according to this:
https://www.raylib.com/cheatsheet/cheatsheet.html
later versions (4.2) return a float or struct Vector2 (2 floats).
Title: Re: Is it possible to detect mouse-wheel turn in a native/console application?
Post by: trithilon on October 04, 2022, 02:44:53 PM
Hi trithilon
Does this help:
https://forums.raspberrypi.com/viewtopic.php?t=30762#p267522
It seems like using the PS2 Intellimouse protocol is the way.
Hope they add support soon: https://github.com/raysan5/raylib/issues/2660

Thanks and sorry for missing your reply.