mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Wiimote: (Re-)Connect a disconnected emulated Wiimote when a mapped button is pressed.
This commit is contained in:
@ -114,22 +114,20 @@ void InterruptChannel(int _number, u16 _channelID, const void* _pData, u32 _Size
|
||||
// input: _number: [Description needed]
|
||||
// output: none
|
||||
//
|
||||
void Update(int _number)
|
||||
void Update(int _number, bool _connected)
|
||||
{
|
||||
//PanicAlert( "Wiimote_Update" );
|
||||
|
||||
// if we are on the next input cycle, update output and input
|
||||
static int _last_number = 4;
|
||||
if (_number <= _last_number)
|
||||
if (_connected)
|
||||
{
|
||||
g_controller_interface.UpdateInput();
|
||||
if (WIIMOTE_SRC_EMU & g_wiimote_sources[_number])
|
||||
((WiimoteEmu::Wiimote*)s_config.controllers[_number])->Update();
|
||||
else
|
||||
WiimoteReal::Update(_number);
|
||||
}
|
||||
_last_number = _number;
|
||||
|
||||
if (WIIMOTE_SRC_EMU & g_wiimote_sources[_number])
|
||||
((WiimoteEmu::Wiimote*)s_config.controllers[_number])->Update();
|
||||
else
|
||||
WiimoteReal::Update(_number);
|
||||
{
|
||||
if (WIIMOTE_SRC_EMU & g_wiimote_sources[_number])
|
||||
((WiimoteEmu::Wiimote*)s_config.controllers[_number])->ConnectOnInput();
|
||||
}
|
||||
}
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
|
Reference in New Issue
Block a user