| OLD | NEW |
| 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 | 369 |
| 370 struct MappingData { | 370 struct MappingData { |
| 371 const char* const vendor_id; | 371 const char* const vendor_id; |
| 372 const char* const product_id; | 372 const char* const product_id; |
| 373 GamepadStandardMappingFunction function; | 373 GamepadStandardMappingFunction function; |
| 374 } AvailableMappings[] = { | 374 } AvailableMappings[] = { |
| 375 // http://www.linux-usb.org/usb.ids | 375 // http://www.linux-usb.org/usb.ids |
| 376 {"0079", "0006", MapperDragonRiseGeneric}, // DragonRise Generic USB | 376 {"0079", "0006", MapperDragonRiseGeneric}, // DragonRise Generic USB |
| 377 {"045e", "028e", MapperXbox360Gamepad}, // Xbox 360 Wired | 377 {"045e", "028e", MapperXbox360Gamepad}, // Xbox 360 Wired |
| 378 {"045e", "028f", MapperXbox360Gamepad}, // Xbox 360 Wireless | 378 {"045e", "028f", MapperXbox360Gamepad}, // Xbox 360 Wireless |
| 379 {"045e", "02d1", MapperXbox360Gamepad}, // Xbox One Wired |
| 380 {"045e", "02dd", MapperXbox360Gamepad}, // Xbox One Wired (2015 FW) |
| 379 {"045e", "02e0", MapperXboxOneHidGamepad}, // Xbox One S (Bluetooth mode) | 381 {"045e", "02e0", MapperXboxOneHidGamepad}, // Xbox One S (Bluetooth mode) |
| 382 {"045e", "02e3", MapperXbox360Gamepad}, // Xbox One Elite Wired |
| 383 {"045e", "02ea", MapperXbox360Gamepad}, // Xbox One S (USB) |
| 380 {"045e", "0719", MapperXbox360Gamepad}, // Xbox 360 Wireless | 384 {"045e", "0719", MapperXbox360Gamepad}, // Xbox 360 Wireless |
| 381 {"046d", "c216", MapperDirectInputStyle}, // Logitech F310, D mode | 385 {"046d", "c216", MapperDirectInputStyle}, // Logitech F310, D mode |
| 382 {"046d", "c218", MapperDirectInputStyle}, // Logitech F510, D mode | 386 {"046d", "c218", MapperDirectInputStyle}, // Logitech F510, D mode |
| 383 {"046d", "c219", MapperDirectInputStyle}, // Logitech F710, D mode | 387 {"046d", "c219", MapperDirectInputStyle}, // Logitech F710, D mode |
| 384 {"054c", "0268", MapperPlaystationSixAxis}, // Playstation SIXAXIS | 388 {"054c", "0268", MapperPlaystationSixAxis}, // Playstation SIXAXIS |
| 385 {"054c", "05c4", MapperDualshock4}, // Playstation Dualshock 4 | 389 {"054c", "05c4", MapperDualshock4}, // Playstation Dualshock 4 |
| 386 {"0583", "2060", MapperIBuffalo}, // iBuffalo Classic | 390 {"0583", "2060", MapperIBuffalo}, // iBuffalo Classic |
| 387 {"0925", "0005", MapperSmartJoyPLUS}, // SmartJoy PLUS Adapter | 391 {"0925", "0005", MapperSmartJoyPLUS}, // SmartJoy PLUS Adapter |
| 388 {"0955", "7210", MapperNvShield}, // Nvidia Shield gamepad | 392 {"0955", "7210", MapperNvShield}, // Nvidia Shield gamepad |
| 389 {"0b05", "4500", MapperADT1}, // Nexus Player Controller | 393 {"0b05", "4500", MapperADT1}, // Nexus Player Controller |
| (...skipping 15 matching lines...) Expand all Loading... |
| 405 const base::StringPiece& product_id) { | 409 const base::StringPiece& product_id) { |
| 406 for (size_t i = 0; i < arraysize(AvailableMappings); ++i) { | 410 for (size_t i = 0; i < arraysize(AvailableMappings); ++i) { |
| 407 MappingData& item = AvailableMappings[i]; | 411 MappingData& item = AvailableMappings[i]; |
| 408 if (vendor_id == item.vendor_id && product_id == item.product_id) | 412 if (vendor_id == item.vendor_id && product_id == item.product_id) |
| 409 return item.function; | 413 return item.function; |
| 410 } | 414 } |
| 411 return NULL; | 415 return NULL; |
| 412 } | 416 } |
| 413 | 417 |
| 414 } // namespace device | 418 } // namespace device |
| OLD | NEW |