mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
Moved InputPluginCommon into the Plugins directory. I don't think it made sense in Core. Some minor fixes to the new wiimote plugin also.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5362 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -76,6 +76,10 @@ void Wiimote::Reset()
|
||||
m_reporting_channel = 0;
|
||||
m_reporting_auto = false;
|
||||
|
||||
// will make the first Update() call send a status request
|
||||
// the first call to RequestStatus() will then set up the status struct extension bit
|
||||
m_extension->active_extension = -1;
|
||||
|
||||
// eeprom
|
||||
memset( m_eeprom, 0, sizeof(m_eeprom) );
|
||||
// calibration data
|
||||
@ -109,9 +113,6 @@ Wiimote::Wiimote( const unsigned int index, SWiimoteInitialize* const wiimote_in
|
||||
: m_index(index)
|
||||
, m_wiimote_init( wiimote_initialize )
|
||||
{
|
||||
// reset eeprom/register/values to default
|
||||
Reset();
|
||||
|
||||
// ---- set up all the controls ----
|
||||
|
||||
// buttons
|
||||
@ -157,6 +158,10 @@ Wiimote::Wiimote( const unsigned int index, SWiimoteInitialize* const wiimote_in
|
||||
groups.push_back( options = new ControlGroup( "Options" ) );
|
||||
options->settings.push_back( new ControlGroup::Setting( "Background Input", false ) );
|
||||
options->settings.push_back( new ControlGroup::Setting( "Sideways Wiimote", false ) );
|
||||
|
||||
|
||||
// --- reset eeprom/register/values to default ---
|
||||
Reset();
|
||||
}
|
||||
|
||||
std::string Wiimote::GetName() const
|
||||
@ -173,17 +178,23 @@ void Wiimote::Update()
|
||||
m_buttons->GetState( &m_status.buttons, button_bitmasks );
|
||||
m_dpad->GetState( &m_status.buttons, is_sideways ? dpad_sideways_bitmasks : dpad_bitmasks );
|
||||
|
||||
if ( false == m_reporting_auto )
|
||||
return;
|
||||
|
||||
// handle extension switching
|
||||
if ( m_extension->active_extension != m_extension->switch_extension )
|
||||
// check if a status report needs to be sent
|
||||
// this happens on wiimote sync and when extensions are switched
|
||||
if (m_extension->active_extension != m_extension->switch_extension)
|
||||
{
|
||||
RequestStatus( m_reporting_channel, NULL );
|
||||
// games don't seem to like me sending the status report and the data report
|
||||
return;
|
||||
|
||||
// Wiibrew: Following a connection or disconnection event on the Extension Port,
|
||||
// data reporting is disabled and the Data Reporting Mode must be reset before new data can arrive.
|
||||
|
||||
// after a game receives an unrequested status report,
|
||||
// it expects data reports to stop until it sets the reporting mode again
|
||||
m_reporting_auto = false;
|
||||
}
|
||||
|
||||
if ( false == m_reporting_auto )
|
||||
return;
|
||||
|
||||
// figure out what data we need
|
||||
size_t rpt_size = 0;
|
||||
size_t rpt_core = 0;
|
||||
|
Reference in New Issue
Block a user