[Pkg-sdl-commits] r230 - unstable/sdlperl/debian/patches
Ryan Niebur
ryan52-guest at alioth.debian.org
Wed Sep 2 07:37:55 UTC 2009
Author: ryan52-guest
Date: 2009-09-02 07:37:54 +0000 (Wed, 02 Sep 2009)
New Revision: 230
Added:
unstable/sdlperl/debian/patches/060_fix_example.diff
Log:
actually add the patch
Added: unstable/sdlperl/debian/patches/060_fix_example.diff
===================================================================
--- unstable/sdlperl/debian/patches/060_fix_example.diff (rev 0)
+++ unstable/sdlperl/debian/patches/060_fix_example.diff 2009-09-02 07:37:54 UTC (rev 230)
@@ -0,0 +1,80 @@
+Index: sdlperl/test/testjoystick.pl
+===================================================================
+--- sdlperl.orig/test/testjoystick.pl 2009-09-02 00:21:02.000000000 -0700
++++ sdlperl/test/testjoystick.pl 2009-09-02 00:26:37.000000000 -0700
+@@ -44,50 +44,50 @@
+ {
+ while($event->poll())
+ {
+- if($event->type() eq SDL::JOYAXISMOTION())
++ if($event->type() eq SDL_JOYAXISMOTION)
+ {
+ print "Joystick ".SDL::JoyAxisEventWhich($$event).
+ " axis ".SDL::JoyAxisEventAxis($$event).
+ " value: ".SDL::JoyAxisEventValue($$event)."\n";
+ }
+- elsif($event->type() eq SDL::JOYHATMOTION())
++ elsif($event->type() eq SDL_JOYHATMOTION)
+ {
+ print "Joystick ".SDL::JoyHatEventWhich($$event).
+ " hat ".SDL::JoyHatEventHat($$event);
+- if(SDL::JoyHatEventValue($$event) == SDL::HAT_CENTERED() )
++ if(SDL::JoyHatEventValue($$event) == SDL_HAT_CENTERED() )
+ {
+ print " centered";
+- } elsif(SDL::JoyHatEventValue($$event) == SDL::HAT_UP() ) {
++ } elsif(SDL::JoyHatEventValue($$event) == SDL_HAT_UP() ) {
+ print " up";
+- } elsif(SDL::JoyHatEventValue($$event) == SDL::HAT_RIGHT() ) {
++ } elsif(SDL::JoyHatEventValue($$event) == SDL_HAT_RIGHT() ) {
+ print " right";
+- } elsif(SDL::JoyHatEventValue($$event) == SDL::HAT_DOWN() ) {
++ } elsif(SDL::JoyHatEventValue($$event) == SDL_HAT_DOWN() ) {
+ print " down";
+- } elsif(SDL::JoyHatEventValue($$event) == SDL::HAT_LEFT()) {
++ } elsif(SDL::JoyHatEventValue($$event) == SDL_HAT_LEFT()) {
+ print " left";
+- } elsif(SDL::JoyHatEventValue($$event) == SDL::HAT_RIGHTUP() ) {
++ } elsif(SDL::JoyHatEventValue($$event) == SDL_HAT_RIGHTUP() ) {
+ print " right & up";
+- } elsif(SDL::JoyHatEventValue($$event) == SDL::HAT_RIGHTDOWN() ) {
++ } elsif(SDL::JoyHatEventValue($$event) == SDL_HAT_RIGHTDOWN() ) {
+ print " right & down";
+- } elsif(SDL::JoyHatEventValue($$event) == SDL::HAT_LEFTDOWN() ) {
++ } elsif(SDL::JoyHatEventValue($$event) == SDL_HAT_LEFTDOWN() ) {
+ print " left & down";
+- } elsif(SDL::JoyHatEventValue($$event) == SDL::HAT_LEFTUP()) {
++ } elsif(SDL::JoyHatEventValue($$event) == SDL_HAT_LEFTUP()) {
+ print " left & up";
+ }
+ print "\n";
+- } elsif($event->type() eq SDL::JOYBALLMOTION()){
++ } elsif($event->type() eq SDL_JOYBALLMOTION){
+ print "Joystick ".SDL::JoyBallEventWhich($$event).
+ " ball ".SDL::JoyBallEventBall($$event).
+ " delta: (".SDL::JoyBallEventXrel($$event).
+ ",".SDL::JoyBallEventYrel($$event)."\n";
+- } elsif($event->type() eq SDL::JOYBUTTONDOWN()){
++ } elsif($event->type() eq SDL_JOYBUTTONDOWN){
+ print "Joystick ".SDL::JoyButtonEventWhich($$event).
+ " button ".SDL::JoyButtonEventButton($$event)." down\n";
+- } elsif($event->type() eq SDL::JOYBUTTONUP()){
++ } elsif($event->type() eq SDL_JOYBUTTONUP){
+ print "Joystick ".SDL::JoyButtonEventWhich($$event).
+ " button ".SDL::JoyButtonEventButton($$event)." up\n";
+- } elsif($event->type() eq SDL_QUIT() or
+- ($event->type() eq SDL_KEYDOWN() and
++ } elsif($event->type() eq SDL_QUIT or
++ ($event->type() eq SDL_KEYDOWN and
+ $event->key_sym() == SDLK_ESCAPE)){
+ $done = 1;
+ }
+@@ -101,7 +101,7 @@
+ -height => 32,
+ -x => $i*34,
+ -y => $screenHeight-34);
+- if(SDL::JoystickGetButton($joystick, $i) eq SDL::PRESSED())
++ if(SDL::JoystickGetButton($joystick, $i) eq SDL_PRESSED)
+ {
+ $app->fill($rect, $colorWhite);
+ } else {
More information about the pkg-sdl-commits
mailing list