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

Side by Side Diff: device/gamepad/gamepad_standard_mappings_linux.cc

Issue 2743153002: Add new Xbox 360 wireless gamepad product ID for Linux (Closed)
Patch Set: fix brown-paper-bag list ordering issue Created 3 years, 9 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 | no next file » | 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 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "device/gamepad/gamepad_standard_mappings.h" 8 #include "device/gamepad/gamepad_standard_mappings.h"
9 9
10 namespace device { 10 namespace device {
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 351
352 struct MappingData { 352 struct MappingData {
353 const char* const vendor_id; 353 const char* const vendor_id;
354 const char* const product_id; 354 const char* const product_id;
355 GamepadStandardMappingFunction function; 355 GamepadStandardMappingFunction function;
356 } AvailableMappings[] = { 356 } AvailableMappings[] = {
357 // http://www.linux-usb.org/usb.ids 357 // http://www.linux-usb.org/usb.ids
358 {"0079", "0006", MapperDragonRiseGeneric}, // DragonRise Generic USB 358 {"0079", "0006", MapperDragonRiseGeneric}, // DragonRise Generic USB
359 {"045e", "028e", MapperXInputStyleGamepad}, // Xbox 360 Wired 359 {"045e", "028e", MapperXInputStyleGamepad}, // Xbox 360 Wired
360 {"045e", "028f", MapperXInputStyleGamepad}, // Xbox 360 Wireless 360 {"045e", "028f", MapperXInputStyleGamepad}, // Xbox 360 Wireless
361 {"045e", "02a1", MapperXInputStyleGamepad}, // Xbox 360 Wireless
361 {"045e", "02d1", MapperXInputStyleGamepad}, // Xbox One Wired 362 {"045e", "02d1", MapperXInputStyleGamepad}, // Xbox One Wired
362 {"045e", "02dd", MapperXInputStyleGamepad}, // Xbox One Wired (2015 FW) 363 {"045e", "02dd", MapperXInputStyleGamepad}, // Xbox One Wired (2015 FW)
363 {"045e", "02e3", MapperXInputStyleGamepad}, // Xbox One Elite Wired 364 {"045e", "02e3", MapperXInputStyleGamepad}, // Xbox One Elite Wired
364 {"045e", "02ea", MapperXInputStyleGamepad}, // Xbox One S (USB) 365 {"045e", "02ea", MapperXInputStyleGamepad}, // Xbox One S (USB)
365 {"045e", "02fd", MapperXboxOneHidGamepad}, // Xbox One S (Bluetooth) 366 {"045e", "02fd", MapperXboxOneHidGamepad}, // Xbox One S (Bluetooth)
366 {"045e", "0719", MapperXInputStyleGamepad}, // Xbox 360 Wireless 367 {"045e", "0719", MapperXInputStyleGamepad}, // Xbox 360 Wireless
367 {"046d", "c21d", MapperXInputStyleGamepad}, // Logitech F310 368 {"046d", "c21d", MapperXInputStyleGamepad}, // Logitech F310
368 {"046d", "c21e", MapperXInputStyleGamepad}, // Logitech F510 369 {"046d", "c21e", MapperXInputStyleGamepad}, // Logitech F510
369 {"046d", "c21f", MapperXInputStyleGamepad}, // Logitech F710 370 {"046d", "c21f", MapperXInputStyleGamepad}, // Logitech F710
370 {"04e8", "a000", MapperSamsung_EI_GP20}, // Samsung Gamepad EI-GP20 371 {"04e8", "a000", MapperSamsung_EI_GP20}, // Samsung Gamepad EI-GP20
(...skipping 21 matching lines...) Expand all
392 const base::StringPiece& product_id) { 393 const base::StringPiece& product_id) {
393 for (size_t i = 0; i < arraysize(AvailableMappings); ++i) { 394 for (size_t i = 0; i < arraysize(AvailableMappings); ++i) {
394 MappingData& item = AvailableMappings[i]; 395 MappingData& item = AvailableMappings[i];
395 if (vendor_id == item.vendor_id && product_id == item.product_id) 396 if (vendor_id == item.vendor_id && product_id == item.product_id)
396 return item.function; 397 return item.function;
397 } 398 }
398 return NULL; 399 return NULL;
399 } 400 }
400 401
401 } // namespace device 402 } // namespace device
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698