- removed joystick setup menu, since it won't work anyway
authorIngo Ruhnke <grumbel@gmx.de>
Wed, 28 Apr 2004 20:51:25 +0000 (20:51 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Wed, 28 Apr 2004 20:51:25 +0000 (20:51 +0000)
- changed wording from key to keyboard
- fixed strcpy versus change_input

SVN-Revision: 820

src/menu.cpp
src/setup.cpp

index bbf1561..b8c41e9 100644 (file)
@@ -158,43 +158,47 @@ void Menu::get_controlfield_key_into_input(MenuItem *item)
   switch(*item->int_p)
   {
   case SDLK_UP:
-    strcpy(item->input, "Up cursor");
+    item->change_input("Up cursor");
     break;
   case SDLK_DOWN:
-    strcpy(item->input, "Down cursor");
+    item->change_input("Down cursor");
     break;
   case SDLK_LEFT:
-    strcpy(item->input, "Left cursor");
+    item->change_input("Left cursor");
     break;
   case SDLK_RIGHT:
-    strcpy(item->input, "Right cursor");
+    item->change_input("Right cursor");
     break;
   case SDLK_RETURN:
-    strcpy(item->input, "Return");
+    item->change_input("Return");
     break;
   case SDLK_SPACE:
-    strcpy(item->input, "Space");
+    item->change_input("Space");
     break;
   case SDLK_RSHIFT:
-    strcpy(item->input, "Right Shift");
+    item->change_input("Right Shift");
     break;
   case SDLK_LSHIFT:
-    strcpy(item->input, "Left Shift");
+    item->change_input("Left Shift");
     break;
   case SDLK_RCTRL:
-    strcpy(item->input, "Right Control");
+    item->change_input("Right Control");
     break;
   case SDLK_LCTRL:
-    strcpy(item->input, "Left Control");
+    item->change_input("Left Control");
     break;
   case SDLK_RALT:
-    strcpy(item->input, "Right Alt");
+    item->change_input("Right Alt");
     break;
   case SDLK_LALT:
-    strcpy(item->input, "Left Alt");
+    item->change_input("Left Alt");
     break;
   default:
-    strcpy(item->input, (char*)item->int_p);
+    {
+      char tmp[64];
+      snprintf(tmp, 64, "%d", *item->int_p);
+      item->change_input(tmp);
+    }
     break;
   }
 }
index d286691..fc8f269 100644 (file)
@@ -405,9 +405,11 @@ void st_menu(void)
       options_menu->additem(MN_DEACTIVE,"Music     ", false,0, MNID_MUSIC);
     }
   options_menu->additem(MN_TOGGLE,"Show FPS  ",show_fps,0, MNID_SHOWFPS);
-  options_menu->additem(MN_GOTO,"Key Setup",0,options_keys_menu);
-  if(use_joystick)
-    options_menu->additem(MN_GOTO,"Joystick Setup",0,options_joystick_menu);
+  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);
+
   options_menu->additem(MN_HL,"",0,0);
   options_menu->additem(MN_BACK,"Back",0,0);