From 2ed8a4331efc61c0cd2e3228e8e125a417d16400 Mon Sep 17 00:00:00 2001 From: snzgoo Date: Sat, 3 Jul 2010 13:05:55 +0000 Subject: [PATCH] Fixing delayed input issues in new and old wiimote plugin for real wiimotes. Having more than 1 real wiimote connected but not connected all of them also ingame it, caused heavy delays of active wiimote input. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5827 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp | 3 +++ .../Plugins/Plugin_WiimoteNew/Src/WiimoteReal/WiimoteReal.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp b/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp index d5d035e9c4..52930d63ef 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp @@ -136,6 +136,9 @@ void SendData(u16 _channelID, const u8* _pData, u32 _Size) /* Read and write data to the Wiimote */ void ReadData() { + if (!m_channelID) + return; + m_pCriticalSection->Enter(); // Send data to the Wiimote diff --git a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteReal/WiimoteReal.cpp b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteReal/WiimoteReal.cpp index c1e48920f8..7db44004a1 100644 --- a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteReal/WiimoteReal.cpp +++ b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteReal/WiimoteReal.cpp @@ -158,6 +158,9 @@ void Wiimote::InterruptChannel(const u16 channel, const void* const data, const void Wiimote::Read() { + if (!m_channel) + return; + if (wiiuse_io_read(m_wiimote)) { // a data report, save it