WiimoteEmu: Remove some remnants of hybrid wiimote.
This commit is contained in:
parent
a95b6e1b9b
commit
6c40c47472
|
@ -112,7 +112,6 @@ void Wiimote::HidOutputReport(const wm_report* const sr, const bool send_ack)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RT_REQUEST_STATUS: // 0x15
|
case RT_REQUEST_STATUS: // 0x15
|
||||||
if (WIIMOTE_SRC_EMU & g_wiimote_sources[m_index])
|
|
||||||
RequestStatus(reinterpret_cast<const wm_request_status*>(sr->data));
|
RequestStatus(reinterpret_cast<const wm_request_status*>(sr->data));
|
||||||
return; // sends its own ack
|
return; // sends its own ack
|
||||||
break;
|
break;
|
||||||
|
@ -122,13 +121,12 @@ void Wiimote::HidOutputReport(const wm_report* const sr, const bool send_ack)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RT_READ_DATA: // 0x17
|
case RT_READ_DATA: // 0x17
|
||||||
if (WIIMOTE_SRC_EMU & g_wiimote_sources[m_index])
|
|
||||||
ReadData(reinterpret_cast<const wm_read_data*>(sr->data));
|
ReadData(reinterpret_cast<const wm_read_data*>(sr->data));
|
||||||
return; // sends its own ack
|
return; // sends its own ack
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RT_WRITE_SPEAKER_DATA: // 0x18
|
case RT_WRITE_SPEAKER_DATA: // 0x18
|
||||||
if (WIIMOTE_SRC_EMU & g_wiimote_sources[m_index] && !m_speaker_mute)
|
if (!m_speaker_mute)
|
||||||
Wiimote::SpeakerData(reinterpret_cast<const wm_speaker_data*>(sr->data));
|
Wiimote::SpeakerData(reinterpret_cast<const wm_speaker_data*>(sr->data));
|
||||||
return; // no ack
|
return; // no ack
|
||||||
break;
|
break;
|
||||||
|
@ -154,8 +152,6 @@ void Wiimote::HidOutputReport(const wm_report* const sr, const bool send_ack)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// send ack
|
|
||||||
if (send_ack && WIIMOTE_SRC_EMU & g_wiimote_sources[m_index])
|
|
||||||
SendAck(sr->wm);
|
SendAck(sr->wm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,22 +211,6 @@ void Wiimote::RequestStatus(const wm_request_status* const rs)
|
||||||
// status values
|
// status values
|
||||||
*reinterpret_cast<wm_status_report*>(data + 2) = m_status;
|
*reinterpret_cast<wm_status_report*>(data + 2) = m_status;
|
||||||
|
|
||||||
// hybrid Wiimote stuff
|
|
||||||
if (WIIMOTE_SRC_REAL & g_wiimote_sources[m_index] && (m_extension->switch_extension <= 0))
|
|
||||||
{
|
|
||||||
using namespace WiimoteReal;
|
|
||||||
|
|
||||||
std::lock_guard<std::mutex> lk(g_wiimotes_mutex);
|
|
||||||
|
|
||||||
if (g_wiimotes[m_index])
|
|
||||||
{
|
|
||||||
wm_request_status rpt = {};
|
|
||||||
g_wiimotes[m_index]->QueueReport(RT_REQUEST_STATUS, &rpt, sizeof(rpt));
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// send report
|
// send report
|
||||||
Core::Callback_WiimoteInterruptChannel(m_index, m_reporting_channel, data, sizeof(data));
|
Core::Callback_WiimoteInterruptChannel(m_index, m_reporting_channel, data, sizeof(data));
|
||||||
}
|
}
|
||||||
|
@ -359,18 +339,6 @@ void Wiimote::ReadData(const wm_read_data* const rd)
|
||||||
// ignore the 0x010000 bit
|
// ignore the 0x010000 bit
|
||||||
address &= 0xFEFFFF;
|
address &= 0xFEFFFF;
|
||||||
|
|
||||||
// hybrid Wiimote stuff
|
|
||||||
// relay the read data request to real-Wiimote
|
|
||||||
if (WIIMOTE_SRC_REAL & g_wiimote_sources[m_index] &&
|
|
||||||
((0xA4 != (address >> 16)) || (m_extension->switch_extension <= 0)))
|
|
||||||
{
|
|
||||||
WiimoteReal::InterruptChannel(m_index, m_reporting_channel, ((u8*)rd) - 2,
|
|
||||||
sizeof(wm_read_data) + 2); // hacky
|
|
||||||
|
|
||||||
// don't want emu-Wiimote to send reply
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReadRequest rr;
|
ReadRequest rr;
|
||||||
u8* const block = new u8[size];
|
u8* const block = new u8[size];
|
||||||
|
|
||||||
|
|
|
@ -923,8 +923,6 @@ void Wiimote::ControlChannel(const u16 channel_id, const void* data, u32 size)
|
||||||
// Wii Remote disconnected
|
// Wii Remote 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, channel_id, data, size);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -983,26 +981,6 @@ void Wiimote::InterruptChannel(const u16 channel_id, const void* data, u32 size)
|
||||||
case HID_PARAM_OUTPUT:
|
case HID_PARAM_OUTPUT:
|
||||||
{
|
{
|
||||||
const wm_report* sr = reinterpret_cast<const wm_report*>(hidp->data);
|
const wm_report* sr = reinterpret_cast<const wm_report*>(hidp->data);
|
||||||
|
|
||||||
if (WIIMOTE_SRC_REAL & g_wiimote_sources[m_index])
|
|
||||||
{
|
|
||||||
switch (sr->wm)
|
|
||||||
{
|
|
||||||
// these two types are handled in RequestStatus() & ReadData()
|
|
||||||
case RT_REQUEST_STATUS:
|
|
||||||
case RT_READ_DATA:
|
|
||||||
if (WIIMOTE_SRC_REAL == g_wiimote_sources[m_index])
|
|
||||||
WiimoteReal::InterruptChannel(m_index, channel_id, data, size);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
WiimoteReal::InterruptChannel(m_index, channel_id, data, size);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
HidOutputReport(sr, m_extension->switch_extension > 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
HidOutputReport(sr);
|
HidOutputReport(sr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue