mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-09 16:14:06 +00:00
Merge pull request #4052 from leoetlino/wiimote-reconnect
Fix Wiimotes not reconnecting on button press
This commit is contained in:
commit
78b68b707f
@ -71,9 +71,7 @@ void Pause()
|
|||||||
// An L2CAP packet is passed from the Core to the Wiimote on the HID CONTROL channel.
|
// 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)
|
void ControlChannel(int number, u16 channel_id, const void* data, u32 size)
|
||||||
{
|
{
|
||||||
if (WIIMOTE_SRC_REAL & g_wiimote_sources[number])
|
if (WIIMOTE_SRC_HYBRID & g_wiimote_sources[number])
|
||||||
WiimoteReal::ControlChannel(number, channel_id, data, size);
|
|
||||||
else if (WIIMOTE_SRC_HYBRID & g_wiimote_sources[number])
|
|
||||||
static_cast<WiimoteEmu::Wiimote*>(s_config.GetController(number))
|
static_cast<WiimoteEmu::Wiimote*>(s_config.GetController(number))
|
||||||
->ControlChannel(channel_id, data, size);
|
->ControlChannel(channel_id, data, size);
|
||||||
}
|
}
|
||||||
|
@ -771,6 +771,8 @@ void Wiimote::ControlChannel(const u16 _channelID, const void* _pData, u32 _Size
|
|||||||
// Wiimote disconnected
|
// Wiimote disconnected
|
||||||
// reset eeprom/register/reporting mode
|
// reset eeprom/register/reporting mode
|
||||||
Reset();
|
Reset();
|
||||||
|
if (WIIMOTE_SRC_REAL & g_wiimote_sources[m_index])
|
||||||
|
WiimoteReal::ControlChannel(m_index, _channelID, _pData, _Size);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,12 +121,10 @@ void Wiimote::ClearReadQueue()
|
|||||||
void Wiimote::ControlChannel(const u16 channel, const void* const data, const u32 size)
|
void Wiimote::ControlChannel(const u16 channel, const void* const data, const u32 size)
|
||||||
{
|
{
|
||||||
// Check for custom communication
|
// Check for custom communication
|
||||||
if (99 == channel)
|
if (channel == 99)
|
||||||
{
|
{
|
||||||
if (m_really_disconnect)
|
if (m_really_disconnect)
|
||||||
DisconnectInternal();
|
DisconnectInternal();
|
||||||
else
|
|
||||||
EmuStop();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -81,8 +81,8 @@ protected:
|
|||||||
Report m_last_input_report;
|
Report m_last_input_report;
|
||||||
u16 m_channel;
|
u16 m_channel;
|
||||||
u8 m_last_connect_request_counter;
|
u8 m_last_connect_request_counter;
|
||||||
// If true, the Wiimote will be really disconnected when it is disconnected by Dolphin,
|
// If true, the Wiimote will be really disconnected when it is disconnected by Dolphin.
|
||||||
// instead of just pausing data reporting.
|
// In any other case, data reporting is not paused to allow reconnecting on any button press.
|
||||||
// This is not enabled on all platforms as connecting a Wiimote can be a pain on some platforms.
|
// This is not enabled on all platforms as connecting a Wiimote can be a pain on some platforms.
|
||||||
bool m_really_disconnect = false;
|
bool m_really_disconnect = false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user