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

Issue 1939613003: Fix broken normalization of some HID axes on OSX (Closed)

Created:
4 years, 7 months ago by cgutman
Modified:
4 years, 7 months ago
Reviewers:
bajones
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

Fix broken normalization of some HID axes on OSX The OUYA and Nvidia Shield controllers report axes with a logical range of -1 to 0. The integer values returned by HID manager for these axes range from 0 to 65535. Without treating these logical ranges as unsigned, the normalization calculation yields incorrect results. Post-normalization, these special axes are also opposite of how the gamepad code expects them (1 to -1 instead of -1 to 1). This CL swaps logical min and max for these axes to invert the result of normalization. R=bajones@chromium.org BUG=608170 TEST=HTML5 Gamepad API test with OUYA or Nvidia Shield controller Committed: https://crrev.com/7dac9dec172d28199da24e3084c6449284f12a90 Cr-Commit-Position: refs/heads/master@{#390866}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -11 lines) Patch
M content/browser/gamepad/gamepad_platform_data_fetcher_mac.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm View 5 chunks +53 lines, -11 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
cgutman
This change addresses incorrect normalization on some gamepads on OSX that leads to normalized values ...
4 years, 7 months ago (2016-04-30 21:49:32 UTC) #1
bajones
On 2016/04/30 21:49:32, cgutman wrote: > This change addresses incorrect normalization on some gamepads on ...
4 years, 7 months ago (2016-04-30 23:09:17 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1939613003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1939613003/1
4 years, 7 months ago (2016-04-30 23:09:41 UTC) #4
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 7 months ago (2016-05-01 00:01:27 UTC) #5
commit-bot: I haz the power
4 years, 7 months ago (2016-05-01 00:02:56 UTC) #7
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/7dac9dec172d28199da24e3084c6449284f12a90
Cr-Commit-Position: refs/heads/master@{#390866}

Powered by Google App Engine
This is Rietveld 408576698