Browse Source

Changed button mapping

changed mapping of previous and next (i.e. wiimote's + and - keys) to
the same as the select and start button
fireclawthefox 9 years ago
parent
commit
719e77a191
2 changed files with 4 additions and 14 deletions
  1. 2 6
      panda/src/device/evdevInputDevice.cxx
  2. 2 8
      panda/src/device/linuxJoystickDevice.cxx

+ 2 - 6
panda/src/device/evdevInputDevice.cxx

@@ -768,20 +768,16 @@ map_button(int code) {
     return GamepadButton::action_2();
 
   case BTN_SELECT:
+  case KEY_PREVIOUS:
     return GamepadButton::back();
 
   case BTN_START:
+  case KEY_NEXT:
     return GamepadButton::start();
 
   case BTN_MODE:
     return GamepadButton::guide();
 
-  case KEY_NEXT:
-    return GamepadButton::next();
-
-  case KEY_PREVIOUS:
-    return GamepadButton::previous();
-
   case BTN_THUMBL:
     return GamepadButton::lstick();
 

+ 2 - 8
panda/src/device/linuxJoystickDevice.cxx

@@ -172,10 +172,12 @@ open_device() {
         break;
 
       case BTN_SELECT:
+      case KEY_PREVIOUS:
         handle = GamepadButton::back();
         break;
 
       case BTN_START:
+      case KEY_NEXT:
         handle = GamepadButton::start();
         break;
 
@@ -183,14 +185,6 @@ open_device() {
         handle = GamepadButton::guide();
         break;
 
-      case KEY_NEXT:
-        handle = GamepadButton::next();
-        break;
-
-      case KEY_PREVIOUS:
-        handle = GamepadButton::previous();
-        break;
-
       case BTN_THUMBL:
         handle = GamepadButton::lstick();
         break;