From: Guus Sliepen Date: Thu, 6 Aug 2015 16:44:39 +0000 (+0200) Subject: Better default joystick configuration. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=deed7483d8e8832261df0d871ff4b7c65df69087;p=quix0rs-blobwars.git Better default joystick configuration. Most controllers are nowadays of the Xbox type, so set the default buttons accordingly. --- 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, "..."); }