[HID/SDL] Return controller subtype instead of forcing gamepad

This commit is contained in:
Gliniak 2025-03-08 20:29:53 +01:00
parent 5af7e1540b
commit 5979274998
1 changed files with 3 additions and 2 deletions

View File

@ -730,8 +730,9 @@ void SDLInputDriver::UpdateXCapabilities(ControllerState& state) {
}
auto& c = state.caps;
c.type = 0x01; // XINPUT_DEVTYPE_GAMEPAD
c.sub_type = 0x01; // XINPUT_DEVSUBTYPE_GAMEPAD
c.type = 0x01; // XINPUT_DEVTYPE_GAMEPAD
c.sub_type = static_cast<uint8_t>(SDL_JoystickGetType(
SDL_GameControllerGetJoystick(state.sdl))); // XINPUT_DEVSUBTYPE_GAMEPAD
c.flags = cap_flags;
c.gamepad.buttons =
0xF3FF | (cvars::guide_button ? X_INPUT_GAMEPAD_GUIDE : 0x0);