if ((MouseReportData.Y != 0) || (MouseReportData.X != 0))\r
SendReport = true;\r
\r
- /* Save the current report data for later comparison to check for changes */\r
- PrevMouseReportData = MouseReportData;\r
- \r
/* Check if the idle period is set and has elapsed */\r
if ((IdleCount != HID_IDLE_CHANGESONLY) && (!(IdleMSRemaining)))\r
{\r
\r
/* Check if Mouse Endpoint Ready for Read/Write and if we should send a new report */\r
if (Endpoint_IsReadWriteAllowed() && SendReport)\r
- {\r
+ { \r
+ /* Save the current report data for later comparison to check for changes */\r
+ PrevMouseReportData = MouseReportData;\r
+\r
/* Write Mouse Report Data */\r
Endpoint_Write_Stream_LE(&MouseReportData, sizeof(MouseReportData));\r
\r