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

Unified Diff: content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm

Issue 15953004: Fixed button values for mac XBox gamepad userland driver. (Issue 243995) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
index 163d20db30ddfd4ddcc89b9b64f9c6385d65d00a..e97829fe2bab0b12916e798cc019aa8c3d18bb55 100644
--- a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
+++ b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
@@ -407,12 +407,12 @@ void GamepadPlatformDataFetcherMac::XboxValueChanged(
WebGamepad& pad = data_.items[slot];
for (size_t i = 0; i < 6; i++) {
- pad.buttons[i] = data.buttons[i] ? 0.0f : 1.1f;
+ pad.buttons[i] = data.buttons[i] ? 1.0f : 0.0f;
}
pad.buttons[6] = data.triggers[0];
pad.buttons[7] = data.triggers[1];
for (size_t i = 8; i < 17; i++) {
- pad.buttons[i] = data.buttons[i - 2] ? 0.0f : 1.1f;
+ pad.buttons[i] = data.buttons[i - 2] ? 1.0f : 0.0f;
}
for (size_t i = 0; i < arraysize(data.axes); i++) {
pad.axes[i] = data.axes[i];
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698