Better default joystick configuration.
authorGuus Sliepen <guus@debian.org>
Thu, 6 Aug 2015 16:44:39 +0000 (18:44 +0200)
committerGuus Sliepen <guus@debian.org>
Thu, 6 Aug 2015 16:44:39 +0000 (18:44 +0200)
Most controllers are nowadays of the Xbox type, so set the default
buttons accordingly.

src/CJoystick.cpp
src/widgets.cpp

index e50cd5ef532260b782659e2076ae991b6acf8aeb..3a624d81d66bdd2dc5914192a2bfbf75dbb0f972 100644 (file)
@@ -21,12 +21,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "headers.h"
 
-Joystick::Joystick()
+Joystick::Joystick():
+       sensitivity(25000),
+       control{-2, -2, -2, -2, 1, 0, 3, 7 ,6}
 {
-       sensitivity = 25000;
-
-       for (int i = 0 ; i < CONTROL::MAX ; i++)
-       {
-               control[i] = i;
-       }
 }
index f27aafef559445bc4090208dc0a3a80625de33f4..e35594d9f4a0e031b112591b1f73ded1915dd4e0 100644 (file)
@@ -131,7 +131,7 @@ void drawJoypadButtonOption(Widget *widget)
        
        // joysticks have a button 0 so we can't
        // do the same thing as the keyboard(!)
-       if (*widget->value <= -1000)
+       if (*widget->value < -2)
        {
                snprintf(text, sizeof text, "...");
        }