}
add_inactive(-1,"");
add_entry(SCAN_JOYSTICKS, _("Scan for Joysticks"));
-
- //Show Joysticks currently activated:
+ //Show Joysticks currently activated: //edit by giby
+ joy = SDL_JoystickOpen(0)
+ 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)
- add_inactive(-1, SDL_JoystickName(SDL_JoystickIndex(*i)) );
+ add_inactive(-1, SDL_JoystickName(joy) );
}
add_hl();
}
std::string
-JoystickMenu::get_button_name(int button)
+/*JoystickMenu::get_button_name(int button)
{
if(button < 0)
return _("None");
std::ostringstream name;
name << "Button " << button;
return name.str();
-}
+}*/
void
JoystickMenu::menu_action(MenuItem* item)