From c52a583090f5fe8dd36a57b2d7628e18ef5f2721 Mon Sep 17 00:00:00 2001 From: John Peterson Date: Thu, 11 Jul 2013 23:25:06 +0200 Subject: [PATCH] Removing reading of the emulated Wiimote state in the real Wiimote mode because * the purpose of the emulated Wiimote state in the real Wiimote mode is to store the real Wiimote state rather than synchronise with an emulated Wiimote --- Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp | 8 +++++--- Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp | 2 ++ Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp | 5 ----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp b/Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp index 47d54725c0..f1904e9534 100644 --- a/Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp +++ b/Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp @@ -760,7 +760,8 @@ void Wiimote::HidOutputReport(const wm_report* const sr, const bool send_ack) break; case WM_REQUEST_STATUS : // 0x15 - RequestStatus((wm_request_status*)sr->data); + if (WIIMOTE_SRC_EMU & g_wiimote_sources[m_index]) + RequestStatus((wm_request_status*)sr->data); return; // sends its own ack break; @@ -769,7 +770,8 @@ void Wiimote::HidOutputReport(const wm_report* const sr, const bool send_ack) break; case WM_READ_DATA : // 0x17 - ReadData((wm_read_data*)sr->data); + if (WIIMOTE_SRC_EMU & g_wiimote_sources[m_index]) + ReadData((wm_read_data*)sr->data); return; // sends its own ack break; @@ -811,7 +813,7 @@ void Wiimote::HidOutputReport(const wm_report* const sr, const bool send_ack) } // send ack - if (send_ack) + if (send_ack && WIIMOTE_SRC_EMU & g_wiimote_sources[m_index]) SendAck(sr->wm); } diff --git a/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp b/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp index f530bc8dea..9645b735b7 100644 --- a/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp +++ b/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp @@ -863,6 +863,8 @@ void Wiimote::InterruptChannel(const u16 _channelID, const void* _pData, u32 _Si // these two types are handled in RequestStatus() & ReadData() case WM_REQUEST_STATUS : case WM_READ_DATA : + if (WIIMOTE_SRC_REAL == g_wiimote_sources[m_index]) + WiimoteReal::InterruptChannel(m_index, _channelID, _pData, _Size); break; default : diff --git a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp index 8568a8ed2a..b5297d8655 100644 --- a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp +++ b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp @@ -299,11 +299,6 @@ void Wiimote::Update() return; } - WiimoteEmu::Wiimote *const wm = (WiimoteEmu::Wiimote*)::Wiimote::GetPlugin()->controllers[index]; - - if (wm->Step()) - return; - // Pop through the queued reports const Report& rpt = ProcessReadQueue();