| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
DVLOG(1) << "XboxControllerMac: called USBDeviceClose";Should this be enclosed in if block of "device_ && device_is_open_"?
RecordUsbDeviceOpenMac(result);We probably need to consider this further because the "kIOReturnExclusiveAccess" and "KERN_SUCCESS" case will return directly.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Should this be enclosed in if block of "device_ && device_is_open_"?
Yes! Forgot brackets, this is done now, thanks for catching that!
We probably need to consider this further because the "kIOReturnExclusiveAccess" and "KERN_SUCCESS" case will return directly.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
GamepadUsbDeviceOpenMacResult result;GamepadUsbDeviceOpenMacResult and XboxControllerMac::OpenDeviceResult represent the same information, let's remove GamepadUsbDeviceOpenMacResult and use the existing enum for metrics.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thanks for the review!
GamepadUsbDeviceOpenMacResult and XboxControllerMac::OpenDeviceResult represent the same information, let's remove GamepadUsbDeviceOpenMacResult and use the existing enum for metrics.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
<int value="1" label="Exclusive Access Error"/>
<int value="2" label="Other Error"/>I think we should update this to align with the order in `OpenDeviceResult`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
void RecordUsbDeviceOpenMac(XboxControllerMac::OpenDeviceResult result);ditto
#include "device/gamepad/xbox_controller_mac.h"Please add build macro to include this file only for Mac and not for other platforms.
void RecordUsbDeviceOpenMac(XboxControllerMac::OpenDeviceResult result);Rob Pitkinditto
Done
#include "device/gamepad/xbox_controller_mac.h"Please add build macro to include this file only for Mac and not for other platforms.
Took a pass at this, I used `IS_APPLE`, but let me know if `IS_MAC` is a better choice.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
<int value="1" label="Exclusive Access Error"/>
<int value="2" label="Other Error"/>I think we should update this to align with the order in `OpenDeviceResult`
Just saw this comment too, great catch! Thanks!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
#include "device/gamepad/xbox_controller_mac.h"Rob PitkinPlease add build macro to include this file only for Mac and not for other platforms.
Took a pass at this, I used `IS_APPLE`, but let me know if `IS_MAC` is a better choice.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
void RecordUsbDeviceOpenMac(XboxControllerMac::OpenDeviceResult result);Please move this method into xbox_controller_mac.cc (define it in the unnamed namespace at the top of the file after kSupportedDeviceIds).
gamepad_uma.h is intended for metrics that need to be recorded across multiple data fetchers. For metrics that are only used in one file it's simpler to keep the Record* method in that file.
DVLOG(1) << "XboxControllerMac: called USBDeviceClose";Let's use VLOG for these messages since it might be useful to see them in release builds. VLOG has some performance impact even when logging is disabled, but it shouldn't be an issue here since opening/closing a gamepad is infrequent.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |