Jelajahi Sumber

*Only* preserve report byte for feature reports. Oops.

Rachel Blackman 3 minggu lalu
induk
melakukan
7ec70d39c4
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/hidapi/android/hid.cpp

+ 1 - 1
src/hidapi/android/hid.cpp

@@ -727,7 +727,7 @@ public:
 
 
 			size_t uBytesToCopy = 0;
 			size_t uBytesToCopy = 0;
 
 
-			if ( m_reportResponse.size() > 0 )
+			if ( bFeature && m_reportResponse.size() > 0 )
 			{
 			{
 				// Make sure we preserve the report value if it isn't already in the report.
 				// Make sure we preserve the report value if it isn't already in the report.
 				bool bHasReportAlready = ( *pData == *m_reportResponse.data() );
 				bool bHasReportAlready = ( *pData == *m_reportResponse.data() );