Title: [211267] branches/safari-603-branch/Source/WebCore
- Revision
- 211267
- Author
- matthew_han...@apple.com
- Date
- 2017-01-27 00:02:11 -0800 (Fri, 27 Jan 2017)
Log Message
Merge r211231. rdar://problem/30217518
Modified Paths
Diff
Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (211266 => 211267)
--- branches/safari-603-branch/Source/WebCore/ChangeLog 2017-01-27 08:02:08 UTC (rev 211266)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog 2017-01-27 08:02:11 UTC (rev 211267)
@@ -1,5 +1,21 @@
2017-01-26 Matthew Hanson <matthew_han...@apple.com>
+ Merge r211231. rdar://problem/30217518
+
+ 2017-01-26 Brady Eidson <beid...@apple.com>
+
+ Gamepads: Some DPads are still not exposed in the HID backend.
+ rdar://problem/30217518 and https://bugs.webkit.org/show_bug.cgi?id=167465
+
+ Reviewed by Alex Christensen.
+
+ No new tests (Currently unable to test HID backend directly)
+
+ * platform/gamepad/mac/HIDGamepad.cpp:
+ (WebCore::HIDGamepad::maybeAddButton): Allow GenericDesktop paged elements that are DPads to be buttons.
+
+2017-01-26 Matthew Hanson <matthew_han...@apple.com>
+
Merge r211230. rdar://problem/30009849
2017-01-26 Commit Queue <commit-qu...@webkit.org>
Modified: branches/safari-603-branch/Source/WebCore/platform/gamepad/mac/HIDGamepad.cpp (211266 => 211267)
--- branches/safari-603-branch/Source/WebCore/platform/gamepad/mac/HIDGamepad.cpp 2017-01-27 08:02:08 UTC (rev 211266)
+++ branches/safari-603-branch/Source/WebCore/platform/gamepad/mac/HIDGamepad.cpp 2017-01-27 08:02:11 UTC (rev 211267)
@@ -125,11 +125,16 @@
bool HIDGamepad::maybeAddButton(IOHIDElementRef element)
{
uint32_t usagePage = IOHIDElementGetUsagePage(element);
- if (usagePage != kHIDPage_Button)
+ if (usagePage != kHIDPage_Button && usagePage != kHIDPage_GenericDesktop)
return false;
uint32_t usage = IOHIDElementGetUsage(element);
- if (!usage)
+
+ if (usagePage == kHIDPage_GenericDesktop) {
+ if (usage < kHIDUsage_GD_DPadUp || usage > kHIDUsage_GD_DPadLeft)
+ return false;
+ usage = std::numeric_limits<uint32_t>::max();
+ } else if (!usage)
return false;
CFIndex min = IOHIDElementGetLogicalMin(element);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes