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

Side by Side Diff: content/browser/gamepad/gamepad_platform_data_fetcher_mac.h

Issue 1939613003: Fix broken normalization of some HID axes on OSX (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ 5 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_
6 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ 6 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_
7 7
8 #include <CoreFoundation/CoreFoundation.h> 8 #include <CoreFoundation/CoreFoundation.h>
9 #include <IOKit/hid/IOHIDManager.h> 9 #include <IOKit/hid/IOHIDManager.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // to update data_. 81 // to update data_.
82 struct AssociatedData { 82 struct AssociatedData {
83 bool is_xbox; 83 bool is_xbox;
84 union { 84 union {
85 struct { 85 struct {
86 IOHIDDeviceRef device_ref; 86 IOHIDDeviceRef device_ref;
87 IOHIDElementRef button_elements[blink::WebGamepad::buttonsLengthCap]; 87 IOHIDElementRef button_elements[blink::WebGamepad::buttonsLengthCap];
88 IOHIDElementRef axis_elements[blink::WebGamepad::axesLengthCap]; 88 IOHIDElementRef axis_elements[blink::WebGamepad::axesLengthCap];
89 CFIndex axis_minimums[blink::WebGamepad::axesLengthCap]; 89 CFIndex axis_minimums[blink::WebGamepad::axesLengthCap];
90 CFIndex axis_maximums[blink::WebGamepad::axesLengthCap]; 90 CFIndex axis_maximums[blink::WebGamepad::axesLengthCap];
91 CFIndex axis_report_sizes[blink::WebGamepad::axesLengthCap];
91 } hid; 92 } hid;
92 struct { 93 struct {
93 XboxController* device; 94 XboxController* device;
94 UInt32 location_id; 95 UInt32 location_id;
95 } xbox; 96 } xbox;
96 }; 97 };
97 }; 98 };
98 AssociatedData associated_[blink::WebGamepads::itemsLengthCap]; 99 AssociatedData associated_[blink::WebGamepads::itemsLengthCap];
99 100
100 DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherMac); 101 DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherMac);
101 }; 102 };
102 103
103 } // namespace content 104 } // namespace content
104 105
105 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ 106 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698