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

Unified Diff: device/hid/hid_service_win.cc

Issue 261053005: Fix Windows HID buffer errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« device/hid/hid_connection_win.cc ('K') | « device/hid/hid_connection_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/hid/hid_service_win.cc
diff --git a/device/hid/hid_service_win.cc b/device/hid/hid_service_win.cc
index dade5d2e51fe3d5b5775051e431c31fdb55cbc99..47dad6b702f7c2862fc166d036d61308c9475948 100644
--- a/device/hid/hid_service_win.cc
+++ b/device/hid/hid_service_win.cc
@@ -204,17 +204,7 @@ void HidServiceWin::PlatformAddDevice(const std::string& device_path) {
device_info.has_report_id = (button_caps[0].ReportID != 0);
}
}
- // If report IDs are supported, adjust all the expected report sizes
- // down by one byte. This is because Windows will always provide sizes
- // which assume the presence of a report ID.
- if (device_info.has_report_id) {
- if (device_info.input_report_size > 0)
- device_info.input_report_size -= 1;
- if (device_info.output_report_size > 0)
- device_info.output_report_size -= 1;
- if (device_info.feature_report_size > 0)
- device_info.feature_report_size -= 1;
- }
+
HidD_FreePreparsedData(preparsed_data);
}
« device/hid/hid_connection_win.cc ('K') | « device/hid/hid_connection_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698