From deed7483d8e8832261df0d871ff4b7c65df69087 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 6 Aug 2015 18:44:39 +0200 Subject: [PATCH] Better default joystick configuration. Most controllers are nowadays of the Xbox type, so set the default buttons accordingly. --- src/CJoystick.cpp | 10 +++------- src/widgets.cpp | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/CJoystick.cpp b/src/CJoystick.cpp index e50cd5e..3a624d8 100644 --- a/src/CJoystick.cpp +++ b/src/CJoystick.cpp @@ -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; - } } diff --git a/src/widgets.cpp b/src/widgets.cpp index f27aafe..e35594d 100644 --- a/src/widgets.cpp +++ b/src/widgets.cpp @@ -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, "..."); } -- 2.39.5