Skip to content

Commit

Permalink
UWP: Skip pad name lookup.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownbrackets committed Jul 4, 2022
1 parent 3ea97b8 commit cd67aca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Windows/XinputDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,14 @@ void XinputDevice::UpdatePad(int pad, const XINPUT_STATE &state, XINPUT_VIBRATIO
static bool notified[XUSER_MAX_COUNT]{};
if (!notified[pad]) {
notified[pad] = true;
#if !PPSSPP_PLATFORM(UWP)
XINPUT_CAPABILITIES_EX caps;
if (PPSSPP_XInputGetCapabilitiesEx != nullptr && PPSSPP_XInputGetCapabilitiesEx(1, pad, 0, &caps) == ERROR_SUCCESS) {
KeyMap::NotifyPadConnected(DEVICE_ID_XINPUT_0 + pad, StringFromFormat("Xbox 360 Pad: %d/%d", caps.vendorId, caps.productId));
} else {
#else
{
#endif
KeyMap::NotifyPadConnected(DEVICE_ID_XINPUT_0 + pad, "Xbox 360 Pad");
}
}
Expand Down

0 comments on commit cd67aca

Please sign in to comment.