Bug 214911 - Special HID mapping for the Dualshock 3 controller
Summary: Special HID mapping for the Dualshock 3 controller
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords: InRadar
Depends on: 214910
Blocks:
  Show dependency treegraph
 
Reported: 2020-07-28 22:22 PDT by Brady Eidson
Modified: 2020-07-31 12:50 PDT (History)
3 users (show)

See Also:


Attachments
Patch (57.20 KB, patch)
2020-07-30 19:01 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch (60.18 KB, patch)
2020-07-30 22:27 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch (60.19 KB, patch)
2020-07-31 11:45 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2020-07-28 22:22:13 PDT
Special HID mapping for the Dualshock 3 controller

Of the controllers that work on macOS out of the box that are not supported by GameController framework, the DS3 is by far the most popular. It also happens to cleanly map to the Web Gamepad "standard" gamepad mapping.

This will be easy after https://bugs.webkit.org/show_bug.cgi?id=214910
Comment 1 Radar WebKit Bug Importer 2020-07-28 22:22:36 PDT
<rdar://problem/66255198>
Comment 2 Brady Eidson 2020-07-30 19:01:50 PDT
Created attachment 405651 [details]
Patch
Comment 3 Sam Weinig 2020-07-30 19:37:17 PDT
Comment on attachment 405651 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=405651&action=review

> Source/WebCore/platform/gamepad/GamepadConstants.h:30
> +#import <IOKit/hid/IOHIDUsageTables.h>

This doesn't seem like this belongs in a platform file that is not OS(DARWIN) specific, or at least guarded by OS(DARWIN) in someway.
Comment 4 Brady Eidson 2020-07-30 19:59:26 PDT
(In reply to Sam Weinig from comment #3)
> Comment on attachment 405651 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=405651&action=review
> 
> > Source/WebCore/platform/gamepad/GamepadConstants.h:30
> > +#import <IOKit/hid/IOHIDUsageTables.h>
> 
> This doesn't seem like this belongs in a platform file that is not
> OS(DARWIN) specific, or at least guarded by OS(DARWIN) in someway.

Yup quite right.
Comment 5 Brady Eidson 2020-07-30 19:59:58 PDT
(In reply to Brady Eidson from comment #4)
> (In reply to Sam Weinig from comment #3)
> > Comment on attachment 405651 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=405651&action=review
> > 
> > > Source/WebCore/platform/gamepad/GamepadConstants.h:30
> > > +#import <IOKit/hid/IOHIDUsageTables.h>
> > 
> > This doesn't seem like this belongs in a platform file that is not
> > OS(DARWIN) specific, or at least guarded by OS(DARWIN) in someway.
> 
> Yup quite right.

That said only the Darwin platforms are broken and all the linucies work lol
Comment 6 Brady Eidson 2020-07-30 22:27:45 PDT
Created attachment 405669 [details]
Patch
Comment 7 Tim Horton 2020-07-31 11:28:31 PDT
Comment on attachment 405669 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=405669&action=review

> Source/WebCore/platform/gamepad/GamepadConstants.h:58
> +extern const size_t numberStandardGamepadButtonsWithoutHomeButton;

number... Of?
Comment 8 Brady Eidson 2020-07-31 11:45:09 PDT
Created attachment 405718 [details]
Patch
Comment 9 EWS 2020-07-31 12:50:38 PDT
Committed r265156: <https://trac.webkit.org/changeset/265156>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 405718 [details].