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

Unified Diff: ui/events/ozone/evdev/event_device_test_util.cc

Issue 2899893003: Add generic mapping for gamepad (Closed)
Patch Set: Add generic mapping for gamepad Created 3 years, 6 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
Index: ui/events/ozone/evdev/event_device_test_util.cc
diff --git a/ui/events/ozone/evdev/event_device_test_util.cc b/ui/events/ozone/evdev/event_device_test_util.cc
index 886fcf41679e011293c5bbfe9d4a79875c79cc88..2477945bd78d66e9acb492ae8c76b818a3015aca 100644
--- a/ui/events/ozone/evdev/event_device_test_util.cc
+++ b/ui/events/ozone/evdev/event_device_test_util.cc
@@ -79,6 +79,36 @@ bool ParseBitfield(const std::string& bitfield,
} // namespace
+// Captured from HJC Game ZD - V gamepad.
+const DeviceAbsoluteAxis kHJCGamepadAbsAxes[] = {
+ {ABS_X, {128, 0, 255, 15, 0}}, {ABS_Y, {128, 0, 255, 15, 0}},
+ {ABS_Z, {128, 0, 255, 15, 0}}, {ABS_RZ, {128, 0, 255, 15, 0}},
+ {ABS_HAT0X, {0, -1, 1, 0, 0}}, {ABS_HAT0Y, {0, 1, 1, 0, 0}}};
+
+const DeviceCapabilities kHJCGamepad = {
+ /* path */
+ "/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.2/1-2.2:1.0/"
+ "input/input38/event11",
+ /* name */ "HJC Game ZD - V",
+ /* phys */ "usb-0000:00:14.0-2.2/input0",
+ /* uniq */ "",
+ /* bustype */ "0011",
+ /* vendor */ "11c5",
+ /* product */ "5506",
+ /* version */ "0111",
+ /* prop */ "0",
+ /* ev */ "1b",
+ /* key */ "fff000000000000 0 0 0 0",
+ /* rel */ "0",
+ /* abs */ "30027",
+ /* msc */ "10",
+ /* sw */ "0",
+ /* led */ "0",
+ /* ff */ "0",
+ kHJCGamepadAbsAxes,
+ arraysize(kHJCGamepadAbsAxes),
+};
+
// Captured from Xbox 360 gamepad.
const DeviceAbsoluteAxis kXboxGamepadAbsAxes[] = {
{ABS_X, {0, -32768, 32767, 16, 128}},
« no previous file with comments | « ui/events/ozone/evdev/event_device_test_util.h ('k') | ui/events/ozone/evdev/gamepad_event_converter_evdev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698