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

Unified Diff: content/browser/gamepad/platform_data_fetcher_linux.cc

Issue 9270015: Add Mac gamepad input remapper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unused dpad helper Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/gamepad/platform_data_fetcher_linux.cc
diff --git a/content/browser/gamepad/platform_data_fetcher_linux.cc b/content/browser/gamepad/platform_data_fetcher_linux.cc
index ef65496b277f03b817acf7b8602e5c72e66370ce..6762c957992b7f978deb2cf73ca201511cc1c7e8 100644
--- a/content/browser/gamepad/platform_data_fetcher_linux.cc
+++ b/content/browser/gamepad/platform_data_fetcher_linux.cc
@@ -159,15 +159,10 @@ void GamepadPlatformDataFetcherLinux::RefreshDevice(udev_device* dev) {
// Driver returns utf-8 strings here, so combine in utf-8 and then convert
// to WebUChar to build the id string.
- std::string id;
- if (mapper) {
- id = base::StringPrintf("%s %s (STANDARD GAMEPAD)",
- manufacturer,
- product);
- } else {
- id = base::StringPrintf("%s %s (Vendor: %s Product: %s)",
+ std::string id = base::StringPrintf("%s %s (%sVendor: %s Product: %s)",
manufacturer,
product,
+ mapper ? "STANDARD GAMEPAD " : "",
vendor_id,
product_id);
}

Powered by Google App Engine
This is Rietveld 408576698