Chromium Code Reviews

Unified Diff: content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm

Issue 176003003: Added support for the Xbox One gamepad on OSX (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing nits Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | content/browser/gamepad/xbox_data_fetcher_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
index 69d0c63e31d4c974c131eafd0f7ef62f0a2e03ce..f09fc83d3790d7b18f04478e51e7c1b073f9b668 100644
--- a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
+++ b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
@@ -353,7 +353,10 @@ void GamepadPlatformDataFetcherMac::XboxDeviceAdd(XboxController* device) {
NSString* ident =
[NSString stringWithFormat:
- @"Xbox 360 Controller (STANDARD GAMEPAD Vendor: %04x Product: %04x)",
+ @"%@ (STANDARD GAMEPAD Vendor: %04x Product: %04x)",
+ device->GetControllerType() == XboxController::XBOX_360_CONTROLLER
+ ? @"Xbox 360 Controller"
+ : @"Xbox One Controller",
device->GetProductId(), device->GetVendorId()];
NSData* as16 = [ident dataUsingEncoding:NSUTF16StringEncoding];
const size_t kOutputLengthBytes = sizeof(data_.items[slot].id);
« no previous file with comments | « no previous file | content/browser/gamepad/xbox_data_fetcher_mac.h » ('j') | no next file with comments »

Powered by Google App Engine