[Gambas-user] Gambas class to read a joystick

Laurent Carlier lordheavym at ...626...
Tue Mar 4 17:32:29 CET 2008


Le Tuesday 04 March 2008 17:14:11 Rob, vous avez écrit :
> On Tuesday 04 March 2008 10:57, Benoit Minisini wrote:
> > I think you shouldn't read usb directly, because the Linux kernel
> > has implemented an abstraction layer with devices located in
> > /dev/input. Apparently you have /dev/input/event? devices that send
>
> Yeah, I agree.  It may be useful to have a generalized Gambas USB
> library available, but where there are abstraction layers I think we
> should use them.  That's why I might end up making an SDL input
> component rather than a raw joystick component, assuming SDL input is
> usable by applications that don't use an SDL event loop, like Qt and
> Gtk ones.  If it works, all Gambas apps on SDL-supported platforms
> would get joystick support, not just Linux.
>
> I wish I could just throw something together to try it, but my time
> for coding is pretty much just the weekends right now.
>
> Rob
>

I've just add a quick and small piece of code for a joystick devices 
component. Currently only "autodetect" is done.

svn co 
https://gambas.svn.sourceforge.net/svnroot/gambas/gambas/branches/2.0-lordhExpComp/gb.joydev

++




More information about the User mailing list