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

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: fix linux 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..a6abc0b471e7bc95b60cb612e4ce7a194ffa0831 100644
--- a/content/browser/gamepad/platform_data_fetcher_linux.cc
+++ b/content/browser/gamepad/platform_data_fetcher_linux.cc
@@ -159,18 +159,12 @@ 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);
- }
TruncateUTF8ToByteSize(id, WebGamepad::idLengthCap - 1, &id);
string16 tmp16 = UTF8ToUTF16(id);
memset(pad.id, 0, sizeof(pad.id));
« no previous file with comments | « content/browser/gamepad/platform_data_fetcher_linux.h ('k') | content/browser/gamepad/platform_data_fetcher_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698