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

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

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
« no previous file with comments | « no previous file | device/gamepad/gamepad_standard_mappings_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 #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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 {"045e", "02dd", MapperXInputStyleGamepad}, // Xbox One Wired (2015 FW) 324 {"045e", "02dd", MapperXInputStyleGamepad}, // Xbox One Wired (2015 FW)
325 {"045e", "02e0", MapperXboxOneHidGamepad}, // Xbox One S (Bluetooth mode) 325 {"045e", "02e0", MapperXboxOneHidGamepad}, // Xbox One S (Bluetooth mode)
326 {"045e", "02e3", MapperXInputStyleGamepad}, // Xbox One Elite Wired 326 {"045e", "02e3", MapperXInputStyleGamepad}, // Xbox One Elite Wired
327 {"045e", "02ea", MapperXInputStyleGamepad}, // Xbox One S (USB) 327 {"045e", "02ea", MapperXInputStyleGamepad}, // Xbox One S (USB)
328 {"045e", "0719", MapperXInputStyleGamepad}, // Xbox 360 Wireless 328 {"045e", "0719", MapperXInputStyleGamepad}, // Xbox 360 Wireless
329 {"046d", "c21d", MapperXInputStyleGamepad}, // Logitech F310 329 {"046d", "c21d", MapperXInputStyleGamepad}, // Logitech F310
330 {"046d", "c21e", MapperXInputStyleGamepad}, // Logitech F510 330 {"046d", "c21e", MapperXInputStyleGamepad}, // Logitech F510
331 {"046d", "c21f", MapperXInputStyleGamepad}, // Logitech F710 331 {"046d", "c21f", MapperXInputStyleGamepad}, // Logitech F710
332 {"054c", "0268", MapperPlaystationSixAxis}, // Playstation SIXAXIS 332 {"054c", "0268", MapperPlaystationSixAxis}, // Playstation SIXAXIS
333 {"054c", "05c4", MapperDualshock4}, // Playstation Dualshock 4 333 {"054c", "05c4", MapperDualshock4}, // Playstation Dualshock 4
334 {"054c", "09cc", MapperDualshock4}, // Dualshock 4 (PS4 Slim)
334 {"0583", "2060", MapperIBuffalo}, // iBuffalo Classic 335 {"0583", "2060", MapperIBuffalo}, // iBuffalo Classic
335 {"0925", "0005", MapperLakeviewResearch}, // SmartJoy PLUS Adapter 336 {"0925", "0005", MapperLakeviewResearch}, // SmartJoy PLUS Adapter
336 {"0925", "8866", MapperLakeviewResearch}, // WiseGroup MP-8866 337 {"0925", "8866", MapperLakeviewResearch}, // WiseGroup MP-8866
337 {"0955", "7210", MapperNvShield}, // Nvidia Shield gamepad 338 {"0955", "7210", MapperNvShield}, // Nvidia Shield gamepad
338 {"0b05", "4500", MapperADT1}, // Nexus Player Controller 339 {"0b05", "4500", MapperADT1}, // Nexus Player Controller
339 {"0e8f", "0003", MapperXGEAR}, // XFXforce XGEAR PS2 Controller 340 {"0e8f", "0003", MapperXGEAR}, // XFXforce XGEAR PS2 Controller
340 {"1532", "0900", MapperRazerServal}, // Razer Serval Controller 341 {"1532", "0900", MapperRazerServal}, // Razer Serval Controller
341 {"18d1", "2c40", MapperADT1}, // ADT-1 Controller 342 {"18d1", "2c40", MapperADT1}, // ADT-1 Controller
342 {"20d6", "6271", MapperMogaPro}, // Moga Pro Controller (HID mode) 343 {"20d6", "6271", MapperMogaPro}, // Moga Pro Controller (HID mode)
343 {"2378", "1008", MapperOnLiveWireless}, // OnLive Controller (Bluetooth) 344 {"2378", "1008", MapperOnLiveWireless}, // OnLive Controller (Bluetooth)
344 {"2378", "100a", MapperOnLiveWireless}, // OnLive Controller (Wired) 345 {"2378", "100a", MapperOnLiveWireless}, // OnLive Controller (Wired)
345 {"2836", "0001", MapperOUYA}, // OUYA Controller 346 {"2836", "0001", MapperOUYA}, // OUYA Controller
346 }; 347 };
347 348
348 } // namespace 349 } // namespace
349 350
350 GamepadStandardMappingFunction GetGamepadStandardMappingFunction( 351 GamepadStandardMappingFunction GetGamepadStandardMappingFunction(
351 const base::StringPiece& vendor_id, 352 const base::StringPiece& vendor_id,
352 const base::StringPiece& product_id) { 353 const base::StringPiece& product_id) {
353 for (size_t i = 0; i < arraysize(AvailableMappings); ++i) { 354 for (size_t i = 0; i < arraysize(AvailableMappings); ++i) {
354 MappingData& item = AvailableMappings[i]; 355 MappingData& item = AvailableMappings[i];
355 if (vendor_id == item.vendor_id && product_id == item.product_id) 356 if (vendor_id == item.vendor_id && product_id == item.product_id)
356 return item.function; 357 return item.function;
357 } 358 }
358 return NULL; 359 return NULL;
359 } 360 }
360 361
361 } // namespace device 362 } // namespace device
OLDNEW
« no previous file with comments | « no previous file | device/gamepad/gamepad_standard_mappings_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698