diff --git a/Source/Core/Core/HW/Wiimote.cpp b/Source/Core/Core/HW/Wiimote.cpp index 1021fef051..7b57eb4cbd 100644 --- a/Source/Core/Core/HW/Wiimote.cpp +++ b/Source/Core/Core/HW/Wiimote.cpp @@ -71,7 +71,9 @@ void Pause() // An L2CAP packet is passed from the Core to the Wiimote on the HID CONTROL channel. void ControlChannel(int number, u16 channel_id, const void* data, u32 size) { - if (WIIMOTE_SRC_HYBRID & g_wiimote_sources[number]) + if (WIIMOTE_SRC_REAL & g_wiimote_sources[number]) + WiimoteReal::ControlChannel(number, channel_id, data, size); + else if (WIIMOTE_SRC_HYBRID & g_wiimote_sources[number]) static_cast(s_config.GetController(number)) ->ControlChannel(channel_id, data, size); } diff --git a/Source/Core/Core/HW/WiimoteReal/IONix.cpp b/Source/Core/Core/HW/WiimoteReal/IONix.cpp index 6d4a9f8145..2313914a0f 100644 --- a/Source/Core/Core/HW/WiimoteReal/IONix.cpp +++ b/Source/Core/Core/HW/WiimoteReal/IONix.cpp @@ -150,6 +150,8 @@ void WiimoteScanner::FindWiimotes(std::vector& found_wiimotes, Wiimote WiimoteLinux::WiimoteLinux(bdaddr_t bdaddr) : Wiimote(), m_bdaddr(bdaddr) { + m_really_disconnect = true; + m_cmd_sock = -1; m_int_sock = -1; diff --git a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp index 1f4dcddb98..f8343e5b43 100644 --- a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp +++ b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp @@ -125,7 +125,10 @@ void Wiimote::ControlChannel(const u16 channel, const void* const data, const u3 // Check for custom communication if (99 == channel) { - EmuStop(); + if (m_really_disconnect) + DisconnectInternal(); + else + EmuStop(); } else { diff --git a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.h b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.h index b0abbb0c8e..4ac81de4c7 100644 --- a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.h +++ b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.h @@ -79,6 +79,10 @@ protected: Report m_last_input_report; u16 m_channel; u8 m_last_connect_request_counter; + // If true, the Wiimote will be really disconnected when it is disconnected by Dolphin, + // instead of just pausing data reporting. + // This is not enabled on all platforms as connecting a Wiimote can be a pain on some platforms. + bool m_really_disconnect = false; private: void ClearReadQueue();