From: Bruno Jesus <00cpxxx@gmail.com> Subject: joy.cpl: Display the correct number of button boxes during test Message-Id: Date: Fri, 22 Jul 2016 21:50:33 -0300 After testing with an 8 button only joystick I noticed that currently the program displays 9 buttons. Then I tested with an PS2 + usb adapter controller and noticed that it is also off by one. I believe nobody notices this because the gamepads have too many buttons nowadays and you never test all of them. Signed-off-by: Bruno Jesus <00cpxxx@gmail.com> diff --git a/dlls/joy.cpl/main.c b/dlls/joy.cpl/main.c index d6ba5d5..b5a55fa 100644 --- a/dlls/joy.cpl/main.c +++ b/dlls/joy.cpl/main.c @@ -457,7 +457,7 @@ static void test_handle_joychange(HWND hwnd, struct JoystickData *data) /* Enable only buttons present in the device */ for (i = 0; i < TEST_MAX_BUTTONS; i++) - ShowWindow(data->graphics.buttons[i], i <= data->joysticks[data->chosen_joystick].num_buttons); + ShowWindow(data->graphics.buttons[i], i < data->joysticks[data->chosen_joystick].num_buttons); } /*********************************************************************