summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorGlenn Rice <glennricster@gmail.com>2010-04-10 18:49:26 +0000
committerGlenn Rice <glennricster@gmail.com>2010-04-10 18:49:26 +0000
commitd00f5b20a1493b437efeca825dca3544489ba99a (patch)
treeff170fa7e60f1a7331c4c5fa5bcd1f20e36d973f /Source
parent50a4293d85d0bf5b7c2e9117fcf910418ed450a6 (diff)
Real Wiimote build fix for linux
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5319 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
-rw-r--r--Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp b/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp
index 2ead6f15d7..4079de11b8 100644
--- a/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp
+++ b/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp
@@ -132,24 +132,26 @@ void SendData(u16 _channelID, const u8* _pData, u32 _Size)
/* Read and write data to the Wiimote */
void ReadData()
{
- m_pCriticalSection->Enter();
+ m_pCriticalSection->Enter();
// Send data to the Wiimote
- if (!m_EventWriteQueue.empty())
- {
+ if (!m_EventWriteQueue.empty())
+ {
//DEBUG_LOG(WIIMOTE, "Writing data to the Wiimote");
- SEvent& rEvent = m_EventWriteQueue.front();
+ SEvent& rEvent = m_EventWriteQueue.front();
wiiuse_io_write(m_pWiiMote, (byte*)rEvent.m_PayLoad, rEvent._Size);
+#ifdef _WIN32
if (m_pWiiMote->event == WIIUSE_UNEXPECTED_DISCONNECT)
{
NOTICE_LOG(WIIMOTE, "wiiuse_io_write: unexpected disconnect. handle: %08x", m_pWiiMote->dev_handle);
}
- m_EventWriteQueue.pop();
-
-// InterruptDebugging(false, rEvent.m_PayLoad);
- }
+#endif
+ m_EventWriteQueue.pop();
- m_pCriticalSection->Leave();
+ // InterruptDebugging(false, rEvent.m_PayLoad);
+ }
+
+ m_pCriticalSection->Leave();
// Read data from wiimote (but don't send it to the core, just filter and queue)
@@ -160,7 +162,7 @@ void ReadData()
if (m_channelID > 0)
{
m_pCriticalSection->Enter();
-
+
// Filter out data reports
if (pBuffer[1] >= 0x30)
{
@@ -180,10 +182,12 @@ void ReadData()
m_pCriticalSection->Leave();
}
}
+#ifdef _WIN32
else if (m_pWiiMote->event == WIIUSE_UNEXPECTED_DISCONNECT)
{
NOTICE_LOG(WIIMOTE, "wiiuse_io_read: unexpected disconnect. handle: %08x", m_pWiiMote->dev_handle);
}
+#endif
};