diff --git a/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp b/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp index e874bfc991..885cc632bf 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp @@ -381,7 +381,7 @@ int IsKey(int Key) default: PanicAlert("There is syntax error in a function that is calling IsKey(%i)", Key); return false; } #else - return true; + return false; #endif } ////////////////////////////////////////// diff --git a/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp b/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp index 224a9db245..9291938468 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp @@ -148,8 +148,8 @@ void ReadData() //INFO_LOG(CONSOLE, "Writing data to the Wiimote\n"); SEvent& rEvent = m_EventWriteQueue.front(); wiiuse_io_write(m_pWiiMote, (byte*)rEvent.m_PayLoad, MAX_PAYLOAD); - m_EventWriteQueue.pop(); - + m_EventWriteQueue.pop(); + #ifdef _WIN32 // Debugging. Move the data one step to the right first. memcpy(rEvent.m_PayLoad + 1, rEvent.m_PayLoad, sizeof(rEvent.m_PayLoad) - 1); @@ -164,12 +164,15 @@ void ReadData() if (wiiuse_io_read(m_pWiiMote)) { const byte* pBuffer = m_pWiiMote->event_buf; - + #ifndef _WIN32 + // The Linux packets are starting out one spot before the Windows one. This should really be handled in the wiiuse library + pBuffer++; + #endif // Check if we have a channel (connection) if so save the data... if (m_channelID > 0) { m_pCriticalSection->Enter(); - + // Filter out data reports if (pBuffer[0] >= 0x30) { @@ -188,14 +191,6 @@ void ReadData() } m_pCriticalSection->Leave(); } -#ifdef _WIN32 - /* Debugging - //if(GetAsyncKeyState('V')) - { - std::string Temp = ArrayToString(pBuffer, 20, 0, 30); - INFO_LOG(CONSOLE, "Data: %s\n", Temp.c_str()); - } */ -#endif } }; /////////////////////