Skip to content

Commit c330a6d

Browse files
cscd98warmenhoven
authored andcommitted
libretro: fix real wii motes when used with dolphin bar
1 parent 86d366b commit c330a6d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Source/Core/DolphinLibretro/Input.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include "InputCommon/GCAdapter.h"
3535
#include "InputCommon/GCPadStatus.h"
3636
#include "InputCommon/InputConfig.h"
37+
#include "Core/Config/WiimoteSettings.h"
3738

3839
//#include "UICommon/UICommon.h"
3940
//#include "Core/HotkeyManager.h"
@@ -607,7 +608,10 @@ void retro_set_controller_port_device(unsigned port, unsigned device)
607608
if (device == RETRO_DEVICE_NONE)
608609
{
609610
if (system.IsWii() && port < 4)
611+
{
612+
Config::SetBaseOrCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::None);
610613
WiimoteCommon::OnSourceChanged(port, WiimoteSource::None);
614+
}
611615

612616
if (!system.IsWii() || !altGCPorts)
613617
{
@@ -983,28 +987,33 @@ void retro_set_controller_port_device_wii(unsigned port, unsigned device)
983987
{
984988
case RETRO_DEVICE_WIIMOTE:
985989
wmExtension->SetSelectedAttachment(ExtensionNumber::NONE);
990+
Config::SetBaseOrCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::Emulated);
986991
WiimoteCommon::OnSourceChanged(port, WiimoteSource::Emulated);
987992
break;
988993

989994
case RETRO_DEVICE_WIIMOTE_SW:
990995
wmExtension->SetSelectedAttachment(ExtensionNumber::NONE);
991996
static_cast<ControllerEmu::NumericSetting<bool>*>(wmOptions->numeric_settings[3].get())
992997
->SetValue(true); // Sideways Wiimote
998+
Config::SetBaseOrCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::Emulated);
993999
WiimoteCommon::OnSourceChanged(port, WiimoteSource::Emulated);
9941000
break;
9951001

9961002
case RETRO_DEVICE_WIIMOTE_NC:
9971003
wmExtension->SetSelectedAttachment(ExtensionNumber::NUNCHUK);
1004+
Config::SetBaseOrCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::Emulated);
9981005
WiimoteCommon::OnSourceChanged(port, WiimoteSource::Emulated);
9991006
break;
10001007

10011008
case RETRO_DEVICE_WIIMOTE_CC:
10021009
case RETRO_DEVICE_WIIMOTE_CC_PRO:
10031010
wmExtension->SetSelectedAttachment(ExtensionNumber::CLASSIC);
1011+
Config::SetBaseOrCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::Emulated);
10041012
WiimoteCommon::OnSourceChanged(port, WiimoteSource::Emulated);
10051013
break;
10061014

10071015
case RETRO_DEVICE_REAL_WIIMOTE:
1016+
Config::SetBaseOrCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::Real);
10081017
WiimoteCommon::OnSourceChanged(port, WiimoteSource::Real);
10091018
break;
10101019
}

0 commit comments

Comments
 (0)