Просмотр исходного кода

Fixed the D-pad on wireless Xbox 360 controllers

Sam Lantinga 9 месяцев назад
Родитель
Сommit
c5f12b135d
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      src/joystick/hidapi/SDL_hidapi_xbox360w.c

+ 2 - 1
src/joystick/hidapi/SDL_hidapi_xbox360w.c

@@ -175,8 +175,9 @@ static bool HIDAPI_DriverXbox360W_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Jo
                         SDL_PlayerLEDHintChanged, ctx);
 
     // Initialize the joystick capabilities
-    joystick->nbuttons = 15;
+    joystick->nbuttons = 11;
     joystick->naxes = SDL_GAMEPAD_AXIS_COUNT;
+    joystick->nhats = 1;
 
     return true;
 }