Removing muted Wiimote audio

because that reduce writes
This commit is contained in:
John Peterson 2013-06-01 06:01:31 +02:00 committed by Rachel Bryk
parent 9e779c22b3
commit e250550de3
2 changed files with 5 additions and 1 deletions

View File

@ -168,6 +168,7 @@ void Wiimote::InterruptChannel(const u16 channel, const void* const _data, const
auto const data = static_cast<const u8*>(_data);
Report rpt(data, data + size);
WiimoteEmu::Wiimote *const wm = (WiimoteEmu::Wiimote*)::Wiimote::GetPlugin()->controllers[index];
// Convert output DATA packets to SET_REPORT packets.
// Nintendo Wiimotes work without this translation, but 3rd
@ -189,7 +190,8 @@ void Wiimote::InterruptChannel(const u16 channel, const void* const _data, const
}
}
else if (rpt[1] == WM_WRITE_SPEAKER_DATA
&& !SConfig::GetInstance().m_WiimoteEnableSpeaker)
&& (!SConfig::GetInstance().m_WiimoteEnableSpeaker
|| (!wm->m_status.speaker || wm->m_speaker_mute)))
{
// Translate speaker data reports into rumble reports.
rpt[1] = WM_RUMBLE;

View File

@ -658,6 +658,8 @@ void Host_SetWiiMoteConnectionState(int _State)
// Update field 1 or 2
event.SetInt(1);
NOTICE_LOG(WIIMOTE, event.GetString().c_str());
main_frame->GetEventHandler()->AddPendingEvent(event);
}