Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Issue 2071223002: Gamepad: Improve gamepad mapping code and unknown gamepad heuristics (Closed)

Created:
4 years, 6 months ago by cgutman
Modified:
4 years, 3 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Gamepad: Improve gamepad mapping code and unknown gamepad heuristics This CL modifies the GamepadMappings class to use subclasses for mappings rather than static methods. The advantage is that the unknown gamepad mapping can keep state around that allows it to create heuristic mappings at GamepadDevice constrution time. This allows stable mappings that don't depend on input to decide correctly. This also means we aren't doing string parsing on each gamepad event anymore. With this change, Moga Pro, Nexus Player (ASUS) Gamepad, and Razer Serval controllers are working correctly without explict mappings. Before the change, the D-Pad on Moga, Serval, and ASUS Gamepad were non-functional. The triggers on the Moga didn't work at all, and the Serval and ASUS Gamepad's triggers were swapped with the shoulder buttons. TEST=http://html5gamepad.com/ BUG=615656 Committed: https://crrev.com/2ec0b0c09fc2cfd30d2ef3b1a7e292c00d0369a8 Cr-Commit-Position: refs/heads/master@{#419372}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Rebasing patch on relocated gamepad folder #

Patch Set 3 : Rename test cases and clarify a comment #

Patch Set 4 : Add missing switch default case #

Unified diffs Side-by-side diffs Delta from patch set Stats (+347 lines, -140 lines) Patch
M device/gamepad/android/java/src/org/chromium/device/gamepad/GamepadDevice.java View 1 4 chunks +6 lines, -5 lines 0 comments Download
M device/gamepad/android/java/src/org/chromium/device/gamepad/GamepadMappings.java View 1 2 3 6 chunks +208 lines, -108 lines 0 comments Download
M device/gamepad/android/junit/src/org/chromium/device/gamepad/GamepadMappingsTest.java View 1 2 10 chunks +133 lines, -27 lines 0 comments Download

Messages

Total messages: 25 (11 generated)
cgutman
Let me know if you'd rather I pursue this implementation instead. The changes are more ...
4 years, 6 months ago (2016-06-17 04:14:54 UTC) #2
bajones
On 2016/06/17 04:14:54, cgutman wrote: > Let me know if you'd rather I pursue this ...
4 years, 6 months ago (2016-06-17 20:37:58 UTC) #3
cgutman
Adding reviewers from the old CL.
4 years, 6 months ago (2016-06-17 21:38:42 UTC) #5
aelias_OOO_until_Jul13
Thanks for looking into this, sorry I let this codereview fall off my radar. https://codereview.chromium.org/2071223002/diff/1/content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java ...
4 years, 3 months ago (2016-09-15 03:20:30 UTC) #6
cgutman
On 2016/09/15 03:20:30, aelias wrote: > Thanks for looking into this, sorry I let this ...
4 years, 3 months ago (2016-09-16 20:01:38 UTC) #7
aelias_OOO_until_Jul13
https://codereview.chromium.org/2071223002/diff/1/content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java File content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java (right): https://codereview.chromium.org/2071223002/diff/1/content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java#newcode280 content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java:280: case MotionEvent.AXIS_LTRIGGER: > Hmm, I think that's going to ...
4 years, 3 months ago (2016-09-16 20:17:21 UTC) #8
cgutman
On 2016/09/16 20:17:21, aelias wrote: > https://codereview.chromium.org/2071223002/diff/1/content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java > File > content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java > (right): > > ...
4 years, 3 months ago (2016-09-17 01:16:09 UTC) #9
aelias_OOO_until_Jul13
lgtm, thanks!
4 years, 3 months ago (2016-09-17 01:24:58 UTC) #12
aelias_OOO_until_Jul13
There is a minor issue found by the trybot, you will have to fix before ...
4 years, 3 months ago (2016-09-17 02:22:35 UTC) #15
cgutman
On 2016/09/17 02:22:35, aelias wrote: > There is a minor issue found by the trybot, ...
4 years, 3 months ago (2016-09-17 02:34:12 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2071223002/60001
4 years, 3 months ago (2016-09-17 02:41:26 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2071223002/60001
4 years, 3 months ago (2016-09-17 17:13:12 UTC) #22
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 3 months ago (2016-09-17 19:36:51 UTC) #23
commit-bot: I haz the power
4 years, 3 months ago (2016-09-17 19:38:09 UTC) #25
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/2ec0b0c09fc2cfd30d2ef3b1a7e292c00d0369a8
Cr-Commit-Position: refs/heads/master@{#419372}

Powered by Google App Engine
This is Rietveld 408576698