50baacd
--- supertuxkart-0.2/src/gui/race_gui.cpp.joy1	2006-10-06 11:25:23.000000000 +0200
50baacd
+++ supertuxkart-0.2/src/gui/race_gui.cpp	2006-10-06 11:25:23.000000000 +0200
50baacd
@@ -144,24 +144,6 @@
50baacd
 } // keybd
50baacd
 
50baacd
 // -----------------------------------------------------------------------------
50baacd
-void RaceGUI::stick(const int &whichAxis, const float &value){
50baacd
-  KartControl controls;
50baacd
-  controls.data[whichAxis] = value;
50baacd
-  assert(world != NULL);
50baacd
-  world -> getPlayerKart(0) -> incomingJoystick ( controls );
50baacd
-}   // stick
50baacd
-
50baacd
-// -----------------------------------------------------------------------------
50baacd
-void RaceGUI::joybuttons( int whichJoy, int hold, int presses, int releases ) {
50baacd
-  KartControl controls;
50baacd
-  controls.buttons = hold;
50baacd
-  controls.presses = presses;
50baacd
-  controls.releases = releases;
50baacd
-  assert(world != NULL);
50baacd
-  world -> getPlayerKart(whichJoy) -> incomingJoystick ( controls );
50baacd
-}   // joybuttons
50baacd
-
50baacd
-// -----------------------------------------------------------------------------
50baacd
 void RaceGUI::drawFPS () {
50baacd
   if (++fpsCounter>=50) {
50baacd
     fpsTimer.update();
50baacd
--- supertuxkart-0.2/src/gui/race_gui.hpp.joy1	2006-09-07 12:08:13.000000000 +0200
50baacd
+++ supertuxkart-0.2/src/gui/race_gui.hpp	2006-10-06 11:25:23.000000000 +0200
50baacd
@@ -42,8 +42,6 @@
50baacd
   void select() {}
50baacd
   void keybd(int key);
50baacd
   void point(int x, int y) { (void)x; (void)y; }
50baacd
-  void stick     (const int &whichAxis, const float &value) ;
50baacd
-  void joybuttons(int whichJoy, int hold, int presses, int releases ) ;
50baacd
 
50baacd
 private:
50baacd
     ulClock   fpsTimer;
50baacd
--- supertuxkart-0.2/src/plibdrv.cpp.joy1	2006-10-06 11:25:23.000000000 +0200
50baacd
+++ supertuxkart-0.2/src/plibdrv.cpp	2006-10-06 11:30:25.000000000 +0200
50baacd
@@ -27,6 +27,7 @@
50baacd
 
50baacd
 #include "gui/menu_manager.hpp"
50baacd
 #include "kart_control.hpp"
50baacd
+#include "world.hpp"
50baacd
 
50baacd
 /*********************************\
50baacd
 *                                 *
50baacd
@@ -79,13 +80,21 @@
50baacd
       static KartControl controls;
50baacd
       int prev_buttons = controls.buttons;
50baacd
       joystick->read ( &controls.buttons, controls.data) ;
50baacd
-      menu->stick( 0, controls.data[0]);
50baacd
-      menu->stick( 1, controls.data[1]);
50baacd
 
50baacd
       int changed_states = prev_buttons ^ controls.buttons;
50baacd
       controls.presses = controls.buttons & changed_states;
50baacd
       controls.releases = !controls.buttons & changed_states;
50baacd
-      menu->joybuttons(0, controls.buttons, controls.presses, controls.releases);
50baacd
+      
50baacd
+      if ( menu_manager->isCurrentMenu( MENUID_RACE ) )
50baacd
+      {
50baacd
+        world -> getPlayerKart(0) -> incomingJoystick ( controls );
50baacd
+      }
50baacd
+      else
50baacd
+      {
50baacd
+        menu->stick( 0, controls.data[0]);
50baacd
+        menu->stick( 1, controls.data[1]);
50baacd
+        menu->joybuttons(0, controls.buttons, controls.presses, controls.releases);
50baacd
+      }
50baacd
     }
50baacd
   }
50baacd
 }