Matt and I discussed removing this DCHECK_EQ and replacing it with a log in our 1:1 yesterday. PTAL, thanks!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
DVLOG(1) << "XInput gamepad claimed by GamepadPlatformDataFetcherMac";nit: Make this VLOG so we can enable the log message in release builds
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
DVLOG(1) << "XInput gamepad claimed by GamepadPlatformDataFetcherMac";nit: Make this VLOG so we can enable the log message in release builds
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Gamepads are now being enumerated by GamepadPlatformDataFetcherMac
instead of XboxDataFetcher due to macOS creating a virtual HID for theI wonder does this actually mean Xinput gamepads used to be enumerated by XboxDataFetecher but now are enumerated by GamepadPlatformDataFetcherMac instead. So it is now safe to remove the DCHECK_EQ and replace it with just a logging message for XInput gamepads?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Gamepads are now being enumerated by GamepadPlatformDataFetcherMac
instead of XboxDataFetcher due to macOS creating a virtual HID for theI wonder does this actually mean Xinput gamepads used to be enumerated by XboxDataFetecher but now are enumerated by GamepadPlatformDataFetcherMac instead. So it is now safe to remove the DCHECK_EQ and replace it with just a logging message for XInput gamepads?
On older macOS XInput gamepads will still be enumerated by XboxDataFetcher but on newer macOS XboxDataFetcher can't claim the USB interface because it's claimed by macOS. Newer macOS also creates a virtual HID gamepad representing the XInput gamepad, this virtual HID is the device seen by GamepadPlatformDataFetcherMac.
The DCHECK was originally added to make sure we weren't double-counting XInput devices in RecordConnectedGamepad which is called from both data fetchers. The DCHECK doesn't actually guard against double-counting, it's just a sanity check, so removing it shouldn't have any adverse effect.
I asked Rob to remove the DCHECK because on newer macOS it causes an unnecessary DCHECK failure whenever an XInput gamepad is connected.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Gamepads are now being enumerated by GamepadPlatformDataFetcherMac
instead of XboxDataFetcher due to macOS creating a virtual HID for theMatt ReynoldsI wonder does this actually mean Xinput gamepads used to be enumerated by XboxDataFetecher but now are enumerated by GamepadPlatformDataFetcherMac instead. So it is now safe to remove the DCHECK_EQ and replace it with just a logging message for XInput gamepads?
On older macOS XInput gamepads will still be enumerated by XboxDataFetcher but on newer macOS XboxDataFetcher can't claim the USB interface because it's claimed by macOS. Newer macOS also creates a virtual HID gamepad representing the XInput gamepad, this virtual HID is the device seen by GamepadPlatformDataFetcherMac.
The DCHECK was originally added to make sure we weren't double-counting XInput devices in RecordConnectedGamepad which is called from both data fetchers. The DCHECK doesn't actually guard against double-counting, it's just a sanity check, so removing it shouldn't have any adverse effect.
I asked Rob to remove the DCHECK because on newer macOS it causes an unnecessary DCHECK failure whenever an XInput gamepad is connected.
Thanks, in that case I wonder how would we address double enumeration case the original DCHECK wish to prevent. Wouldn't remove the DCHECK now reveal the original issue where the same controller can be duplicate in chooser? Should we log the message and return early?