diff -Naur supertux-0.1.3/src/configfile.cpp supertux-0.1.3.joystick/src/configfile.cpp
--- supertux-0.1.3/src/configfile.cpp	2005-06-21 23:16:07.000000000 +0200
+++ supertux-0.1.3.joystick/src/configfile.cpp	2005-08-21 02:19:13.000000000 +0200
@@ -87,10 +87,6 @@
     use_gl = false;
 
   reader.read_int ("joystick", &joystick_num);
-  if (!(joystick_num >= 0))
-    use_joystick = false;
-  else
-    use_joystick = true;
 
   reader.read_int ("joystick-x", &joystick_keymap.x_axis);
   reader.read_int ("joystick-y", &joystick_keymap.y_axis);
diff -Naur supertux-0.1.3/src/menu.cpp supertux-0.1.3.joystick/src/menu.cpp
--- supertux-0.1.3/src/menu.cpp	2005-06-29 14:44:13.000000000 +0200
+++ supertux-0.1.3.joystick/src/menu.cpp	2005-08-21 02:22:51.000000000 +0200
@@ -559,6 +559,7 @@
   case MN_TEXTFIELD:
   case MN_NUMFIELD:
   case MN_CONTROLFIELD:
+  case MN_CONTROLFIELD_JOYSTICK:
     {
       int input_pos = input_width/2;
       int text_pos  = (text_width + font_width)/2;
@@ -570,7 +571,7 @@
                input_width + font_width, 18,
                0,0,0,128);
 
-      if(pitem.kind == MN_CONTROLFIELD)
+      if(pitem.kind == MN_CONTROLFIELD || pitem.kind == MN_CONTROLFIELD_JOYSTICK)
         get_controlfield_key_into_input(&pitem);
 
       if(pitem.kind == MN_TEXTFIELD || pitem.kind == MN_NUMFIELD)
@@ -807,7 +808,16 @@
            menuaction = MENU_ACTION_DOWN;
        break;
   case  SDL_JOYAXISMOTION:
-    if(event.jaxis.axis == joystick_keymap.y_axis)
+    if(item[active_item].kind == MN_CONTROLFIELD_JOYSTICK)
+    {
+	    static bool flag = false;
+
+	    *item[active_item].int_p = event.jaxis.axis;
+	    if(flag)
+		    menuaction = MENU_ACTION_DOWN;
+	    flag = !flag;
+    }
+    else if(event.jaxis.axis == joystick_keymap.y_axis)
     {
       if (event.jaxis.value > 1024)
         menuaction = MENU_ACTION_DOWN;
@@ -817,6 +827,11 @@
     break;
   case  SDL_JOYBUTTONDOWN:
     menuaction = MENU_ACTION_HIT;
+    if(item[active_item].kind == MN_CONTROLFIELD_JOYSTICK)
+    {
+	    *item[active_item].int_p = event.jbutton.button;
+	    menuaction = MENU_ACTION_DOWN;
+    }
     break;
   case SDL_MOUSEBUTTONDOWN:
     x = event.motion.x;
diff -Naur supertux-0.1.3/src/menu.h supertux-0.1.3.joystick/src/menu.h
--- supertux-0.1.3/src/menu.h	2005-06-21 23:16:07.000000000 +0200
+++ supertux-0.1.3.joystick/src/menu.h	2005-08-21 02:27:49.000000000 +0200
@@ -104,6 +104,7 @@
   MN_TEXTFIELD,
   MN_NUMFIELD,
   MN_CONTROLFIELD,
+  MN_CONTROLFIELD_JOYSTICK,
   MN_STRINGSELECT,
   MN_LABEL,
   MN_HL, /* horizontal line */
diff -Naur supertux-0.1.3/src/setup.cpp supertux-0.1.3.joystick/src/setup.cpp
--- supertux-0.1.3/src/setup.cpp	2005-07-08 14:19:17.000000000 +0200
+++ supertux-0.1.3.joystick/src/setup.cpp	2005-08-21 02:20:56.000000000 +0200
@@ -413,8 +413,8 @@
   options_menu->additem(MN_TOGGLE,"Show FPS  ",show_fps,0, MNID_SHOWFPS);
   options_menu->additem(MN_GOTO,"Keyboard Setup",0,options_keys_menu);
 
-  //if(use_joystick)
-  //  options_menu->additem(MN_GOTO,"Joystick Setup",0,options_joystick_menu);
+  if(use_joystick)
+    options_menu->additem(MN_GOTO,"Joystick Setup",0,options_joystick_menu);
 
   options_menu->additem(MN_HL,"",0,0);
   options_menu->additem(MN_BACK,"Back",0,0);
@@ -433,12 +433,12 @@
     {
     options_joystick_menu->additem(MN_LABEL,"Joystick Setup",0,0);
     options_joystick_menu->additem(MN_HL,"",0,0);
-    options_joystick_menu->additem(MN_CONTROLFIELD,"X axis", 0,0, 0,&joystick_keymap.x_axis);
-    options_joystick_menu->additem(MN_CONTROLFIELD,"Y axis", 0,0, 0,&joystick_keymap.y_axis);
-    options_joystick_menu->additem(MN_CONTROLFIELD,"A button", 0,0, 0,&joystick_keymap.a_button);
-    options_joystick_menu->additem(MN_CONTROLFIELD,"B button", 0,0, 0,&joystick_keymap.b_button);
-    options_joystick_menu->additem(MN_CONTROLFIELD,"Start", 0,0, 0,&joystick_keymap.start_button);
-    options_joystick_menu->additem(MN_CONTROLFIELD,"DeadZone", 0,0, 0,&joystick_keymap.dead_zone);
+    options_joystick_menu->additem(MN_CONTROLFIELD_JOYSTICK,"X axis", 0,0, 0,&joystick_keymap.x_axis);
+    options_joystick_menu->additem(MN_CONTROLFIELD_JOYSTICK,"Y axis", 0,0, 0,&joystick_keymap.y_axis);
+    options_joystick_menu->additem(MN_CONTROLFIELD_JOYSTICK,"A button", 0,0, 0,&joystick_keymap.a_button);
+    options_joystick_menu->additem(MN_CONTROLFIELD_JOYSTICK,"B button", 0,0, 0,&joystick_keymap.b_button);
+    options_joystick_menu->additem(MN_CONTROLFIELD_JOYSTICK,"Start", 0,0, 0,&joystick_keymap.start_button);
+//    options_joystick_menu->additem(MN_CONTROLFIELD,"DeadZone", 0,0, 0,&joystick_keymap.dead_zone);
     options_joystick_menu->additem(MN_HL,"",0,0);
     options_joystick_menu->additem(MN_BACK,"Back",0,0);
     }
@@ -780,6 +780,8 @@
         }
       else
         {
+	  if(joystick_num < 0)
+		  joystick_num = 0;
           js = SDL_JoystickOpen(joystick_num);
 
           if (js == NULL)
