diff --git a/stepmania/src/InputMapper.cpp b/stepmania/src/InputMapper.cpp index 76842e66fc..36477b847d 100644 --- a/stepmania/src/InputMapper.cpp +++ b/stepmania/src/InputMapper.cpp @@ -93,7 +93,7 @@ const AutoJoyMapping g_AutoJoyMappings[] = { "dance", "4 axis 16 button joystick", - "PC Magic Box", + "EMS USB2", { { 0, JOY_BUTTON_16, DANCE_BUTTON_LEFT, false }, { 0, JOY_BUTTON_14, DANCE_BUTTON_RIGHT, false }, @@ -401,7 +401,25 @@ const AutoJoyMapping g_AutoJoyMappings[] = }, }; -void InputMapper::ApplyMapping( const Mapping *maps, GameController gc, InputDevice device ) +void InputMapper::Unmap( InputDevice id ) +{ + for( int i=0; iInfo( "Applying default joystick mapping #%d for device '%s' (%s)", iNumJoysticksMapped+1, mapping.szDriverRegex, mapping.szControllerName ); - ApplyMapping( mapping.maps, gc, device ); + Unmap( id ); + ApplyMapping( mapping.maps, gc, id ); iNumJoysticksMapped++; } diff --git a/stepmania/src/InputMapper.h b/stepmania/src/InputMapper.h index b34f3ac3ad..df6a6bd2ef 100644 --- a/stepmania/src/InputMapper.h +++ b/stepmania/src/InputMapper.h @@ -76,6 +76,7 @@ public: static InputDevice MultiPlayerToInputDevice( MultiPlayer mp ); static MultiPlayer InputDeviceToMultiPlayer( InputDevice id ); + void Unmap( InputDevice device ); void ApplyMapping( const Mapping *maps, GameController gc, InputDevice device ); protected: