From 9b019f6b7259ccf52e3797510442101f666dd706 Mon Sep 17 00:00:00 2001 From: Florent Rougon Date: Mon, 29 Apr 2019 12:54:03 +0200 Subject: [PATCH] FGJoystickInput: increase MAX_JOYSTICKS from 10 to 16 Since PLIBjs uses joyGetDevCaps()[1] on Windows and this function accepts joystick ids from 0 to 15 (-1 being special), setting MAX_JOYSTICKS to 16 ensures that FGJoystickInput::init() can scan all joysticks that joyGetDevCaps() is able to report about. [1] https://docs.microsoft.com/en-us/previous-versions/dd757105(v%3Dvs.85) --- src/Input/FGJoystickInput.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Input/FGJoystickInput.hxx b/src/Input/FGJoystickInput.hxx index 4a5a761f2..1087be9bd 100644 --- a/src/Input/FGJoystickInput.hxx +++ b/src/Input/FGJoystickInput.hxx @@ -46,7 +46,7 @@ public: virtual void reinit(); virtual void update( double dt ); - static const int MAX_JOYSTICKS = 10; + static const int MAX_JOYSTICKS = 16; static const int MAX_JOYSTICK_AXES = _JS_MAX_AXES; static const int MAX_JOYSTICK_BUTTONS = 32;