Trammell Hudson wrote:
> I see in the plib 1.8.4 release that there is a protected data member
> named 'num_buttons' in the jsJoystick class, but nothing that exposes
> this to the user of the class. For a joystick configuration tool I
> need to know how many buttons can be configured and can get it by
> inheriting from jsJoystick and writing my own accessor.
>
> This works great for me under Linux, although I'd prefer not to
> depend that closely on an implementation detail. More problematic,
> however, is that it looks like the Windows version doesn't fill in
> this member. Is there a way to portably get the number of buttons?
Trammell,
As there is a getNumAxes(), I saw no reason why not to add
getNumButtons().
It's in CVS.
Also, I changed jsWindows.cxx to properly set num_buttons.
I did not build the windows version.
If someone could please test wether it still compiles,
and maybe even test the getNumButtons() output, that would
be great.
Bram
>
> Thanks,
> -- Trammell
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> plib-devel mailing list
> pli...@li...
> https://lists.sourceforge.net/lists/listinfo/plib-devel
--
Bram Stolk, VR Engineer SARA, Amsterdam. tel +31 20 592 3000
"Windows is a 32-bit extension to a 16-bit graphical shell for an 8-bit
operating system originally coded for a 4-bit microprocessor by a 2-bit
company that can't stand 1 bit of competition."
|