From ba744f1eae905daec2d1a83382260d1f481a1a41 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 23 Feb 2003 06:26:33 +0000 Subject: [PATCH] error handling --- stepmania/src/RageInput.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stepmania/src/RageInput.cpp b/stepmania/src/RageInput.cpp index 27ad8239d1..f31109ecde 100644 --- a/stepmania/src/RageInput.cpp +++ b/stepmania/src/RageInput.cpp @@ -45,12 +45,20 @@ RageInput::RageInput() for( int i=0; iInfo(" %d: '%s' Error opening: %s", + i, SDL_JoystickName(i), SDL_GetError()); + continue; + } + LOG->Info( " %d: '%s' axes: %d, hats: %d, buttons: %d", i, SDL_JoystickName(i), SDL_JoystickNumAxes(pJoystick), SDL_JoystickNumHats(pJoystick), SDL_JoystickNumButtons(pJoystick) ); + /* For some weird reason, we won't get any joystick events at all * if we don't keep the joystick open. (Why? The joystick event * API is completely separate from the SDL_Joystick polling API ...) */