Few more fixes to SDL2 conversion
authorTobias Markus <tobbi@mozilla-uk.org>
Sat, 31 Aug 2013 18:19:53 +0000 (20:19 +0200)
committerTobias Markus <tobbi@mozilla-uk.org>
Sat, 31 Aug 2013 18:19:53 +0000 (20:19 +0200)
src/supertux/menu/joystick_menu.cpp
src/supertux/menu/keyboard_menu.hpp

index 38733ff..9c454a0 100644 (file)
@@ -60,8 +60,11 @@ JoystickMenu::recreateMenu()
   add_inactive(-1,"");
   add_entry(SCAN_JOYSTICKS, _("Scan for Joysticks"));
   //Show Joysticks currently activated: //edit by giby
-    joy = SDL_JoystickOpen(0)
-    if (SDL_NumJoysticks() > 0) {joy = SDL_JoystickOpen(0);
+  SDL_Joystick *joy;
+  if (SDL_NumJoysticks() > 0) {
+    joy = SDL_JoystickOpen(0);
+  }
+
   for(std::vector<SDL_Joystick*>::iterator i = controller->joysticks.begin();
       i != controller->joysticks.end(); ++i) {
     if(*i != 0)
@@ -73,8 +76,9 @@ JoystickMenu::recreateMenu()
   update();
 }
 
+/*
 std::string
-/*JoystickMenu::get_button_name(int button)
+JoystickMenu::get_button_name(int button)
 {
   if(button < 0)
     return _("None");
index c83cb4b..b09c406 100644 (file)
@@ -28,7 +28,7 @@ public:
   ~KeyboardMenu();
 
   void update();
-  std::string SDL_GetKeyName(SDL_Keycode* key);
+  std::string get_key_name(SDL_Keycode key);
   virtual void menu_action(MenuItem* item);
   JoystickKeyboardController* controller;
   void check_menu() {}