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

Side by Side Diff: device/gamepad/gamepad_standard_mappings_mac.mm

Issue 2490103002: Add mapping entry for newer DualShock 4 model (Closed)
Patch Set: Differentiate new DS4 model with comment Created 4 years, 1 month 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
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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 {"045e", "02dd", MapperXbox360Gamepad}, // Xbox One Wired (2015 FW) 380 {"045e", "02dd", MapperXbox360Gamepad}, // Xbox One Wired (2015 FW)
381 {"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 382 {"045e", "02e3", MapperXbox360Gamepad}, // Xbox One Elite Wired
383 {"045e", "02ea", MapperXbox360Gamepad}, // Xbox One S (USB) 383 {"045e", "02ea", MapperXbox360Gamepad}, // Xbox One S (USB)
384 {"045e", "0719", MapperXbox360Gamepad}, // Xbox 360 Wireless 384 {"045e", "0719", MapperXbox360Gamepad}, // Xbox 360 Wireless
385 {"046d", "c216", MapperDirectInputStyle}, // Logitech F310, D mode 385 {"046d", "c216", MapperDirectInputStyle}, // Logitech F310, D mode
386 {"046d", "c218", MapperDirectInputStyle}, // Logitech F510, D mode 386 {"046d", "c218", MapperDirectInputStyle}, // Logitech F510, D mode
387 {"046d", "c219", MapperDirectInputStyle}, // Logitech F710, D mode 387 {"046d", "c219", MapperDirectInputStyle}, // Logitech F710, D mode
388 {"054c", "0268", MapperPlaystationSixAxis}, // Playstation SIXAXIS 388 {"054c", "0268", MapperPlaystationSixAxis}, // Playstation SIXAXIS
389 {"054c", "05c4", MapperDualshock4}, // Playstation Dualshock 4 389 {"054c", "05c4", MapperDualshock4}, // Playstation Dualshock 4
390 {"054c", "09cc", MapperDualshock4}, // Dualshock 4 (PS4 Slim)
390 {"0583", "2060", MapperIBuffalo}, // iBuffalo Classic 391 {"0583", "2060", MapperIBuffalo}, // iBuffalo Classic
391 {"0925", "0005", MapperSmartJoyPLUS}, // SmartJoy PLUS Adapter 392 {"0925", "0005", MapperSmartJoyPLUS}, // SmartJoy PLUS Adapter
392 {"0955", "7210", MapperNvShield}, // Nvidia Shield gamepad 393 {"0955", "7210", MapperNvShield}, // Nvidia Shield gamepad
393 {"0b05", "4500", MapperADT1}, // Nexus Player Controller 394 {"0b05", "4500", MapperADT1}, // Nexus Player Controller
394 {"0e8f", "0003", MapperXGEAR}, // XFXforce XGEAR PS2 Controller 395 {"0e8f", "0003", MapperXGEAR}, // XFXforce XGEAR PS2 Controller
395 {"1532", "0900", MapperRazerServal}, // Razer Serval Controller 396 {"1532", "0900", MapperRazerServal}, // Razer Serval Controller
396 {"18d1", "2c40", MapperADT1}, // ADT-1 Controller 397 {"18d1", "2c40", MapperADT1}, // ADT-1 Controller
397 {"20d6", "6271", MapperMogaPro}, // Moga Pro Controller (HID mode) 398 {"20d6", "6271", MapperMogaPro}, // Moga Pro Controller (HID mode)
398 {"2222", "0060", MapperDirectInputStyle}, // Macally iShockX, analog mode 399 {"2222", "0060", MapperDirectInputStyle}, // Macally iShockX, analog mode
399 {"2222", "4010", MapperMacallyIShock}, // Macally iShock 400 {"2222", "4010", MapperMacallyIShock}, // Macally iShock
400 {"2378", "1008", MapperOnLiveWireless}, // OnLive Controller (Bluetooth) 401 {"2378", "1008", MapperOnLiveWireless}, // OnLive Controller (Bluetooth)
401 {"2378", "100a", MapperOnLiveWireless}, // OnLive Controller (Wired) 402 {"2378", "100a", MapperOnLiveWireless}, // OnLive Controller (Wired)
402 {"2836", "0001", MapperOUYA}, // OUYA Controller 403 {"2836", "0001", MapperOUYA}, // OUYA Controller
403 }; 404 };
404 405
405 } // namespace 406 } // namespace
406 407
407 GamepadStandardMappingFunction GetGamepadStandardMappingFunction( 408 GamepadStandardMappingFunction GetGamepadStandardMappingFunction(
408 const base::StringPiece& vendor_id, 409 const base::StringPiece& vendor_id,
409 const base::StringPiece& product_id) { 410 const base::StringPiece& product_id) {
410 for (size_t i = 0; i < arraysize(AvailableMappings); ++i) { 411 for (size_t i = 0; i < arraysize(AvailableMappings); ++i) {
411 MappingData& item = AvailableMappings[i]; 412 MappingData& item = AvailableMappings[i];
412 if (vendor_id == item.vendor_id && product_id == item.product_id) 413 if (vendor_id == item.vendor_id && product_id == item.product_id)
413 return item.function; 414 return item.function;
414 } 415 }
415 return NULL; 416 return NULL;
416 } 417 }
417 418
418 } // namespace device 419 } // namespace device
OLDNEW
« no previous file with comments | « device/gamepad/gamepad_standard_mappings_linux.cc ('k') | device/gamepad/gamepad_standard_mappings_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698