develooper Front page | perl.sdl.devel | Postings from December 2003

Re: [SDLperl] joystick patches

Thread Previous | Thread Next
From:
w keenan
Date:
December 20, 2003 23:36
Subject:
Re: [SDLperl] joystick patches
Message ID:
20030107093834.39126.qmail@web9905.mail.yahoo.com
 --- "David J. Goehrig" <dave@cthulhu-burger.org>
wrote: > On Tue, Jan 07, 2003 at 01:49:21AM -0000,
wayne
> keenan wrote:
> > Some small fry patches to fix joystick support in
> XS and the test script.

I should say whats been fixed:

SDL_perl.xs:  

JoyAxisEventValue did return Uint8, is now Sint16


testjoystick.pl:

Changedused of SDL::MapRGB , as values returned were
being passed to SDL::App::fill causing a seg fault.
Change it to use SDL::Color objects instead.

Added support for more than one axis. (now represented
as left/right bars)
I very chuffed that Mdk9.0 picked up my cyborg 3d USB
joystick, but, it's doesn't pick up the hat as a hat,
instead it's another axis. Need to look at this,
jstest thinks so too, hmm...



> > 
> > Does SDL::App really have to init everything?  
> 
> Well it is just simplest that way.  Simplest == Best
> in this case.
> Sure could have each of the modules init their own
> stuff, but that's
> far more complex.

I dont see it as that complex, the modules whould have
to 'register' there intrest in providing a flag that
can be passed to the SDL_INIT call in SDL::App.  But,
they dont know if they sould be, it's up to the
programmer.  Perhaps a new flag to SDL::App::new() ??

All the best
Wayne


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About