else if (JoyStatus_LCL & JOY_DOWN)\r
ReportData->Y = 1;\r
\r
- if (JoyStatus_LCL & JOY_RIGHT)\r
- ReportData->X = 1;\r
- else if (JoyStatus_LCL & JOY_LEFT)\r
+ if (JoyStatus_LCL & JOY_LEFT)\r
ReportData->X = -1;\r
+ else if (JoyStatus_LCL & JOY_RIGHT)\r
+ ReportData->X = 1;\r
\r
if (JoyStatus_LCL & JOY_PRESS)\r
ReportData->Button = (1 << 0);\r
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