diff options
author | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-13 16:42:13 +0000 |
---|---|---|
committer | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-13 16:42:13 +0000 |
commit | 812b779a612f4768d00b8ae3f9ce936113b53ba2 (patch) | |
tree | 4d68b87437c48b86f43abf5545a87b20ec84c250 /content/browser/gamepad | |
parent | bde0436122f40172b97f786e238db55036a7575d (diff) | |
download | chromium_src-812b779a612f4768d00b8ae3f9ce936113b53ba2.zip chromium_src-812b779a612f4768d00b8ae3f9ce936113b53ba2.tar.gz chromium_src-812b779a612f4768d00b8ae3f9ce936113b53ba2.tar.bz2 |
Gamepad: Don't emit BOM in Gamepad ID.
This change makes the gamepad ID little-endian and not include a byte-order
mark, making it consistent with other platforms.
I tested that the html5rocks.com gamepad tester still emits this correct ID for
the gamepad after this change.
BUG=229580
Review URL: https://chromiumcodereview.appspot.com/15039018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199743 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/gamepad')
-rw-r--r-- | content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm index 84bad06..b9356f2 100644 --- a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm +++ b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm @@ -217,7 +217,7 @@ void GamepadPlatformDataFetcherMac::DeviceAdd(IOHIDDeviceRef device) { associated_[slot].mapper ? "STANDARD GAMEPAD " : "", vendor_int, product_int]; - NSData* as16 = [ident dataUsingEncoding:NSUTF16StringEncoding]; + NSData* as16 = [ident dataUsingEncoding:NSUTF16LittleEndianStringEncoding]; const size_t kOutputLengthBytes = sizeof(data_.items[slot].id); memset(&data_.items[slot].id, 0, kOutputLengthBytes); |