|
34 | 34 | #include "InputCommon/GCAdapter.h" |
35 | 35 | #include "InputCommon/GCPadStatus.h" |
36 | 36 | #include "InputCommon/InputConfig.h" |
| 37 | +#include "Core/Config/WiimoteSettings.h" |
37 | 38 |
|
38 | 39 | //#include "UICommon/UICommon.h" |
39 | 40 | //#include "Core/HotkeyManager.h" |
@@ -607,7 +608,10 @@ void retro_set_controller_port_device(unsigned port, unsigned device) |
607 | 608 | if (device == RETRO_DEVICE_NONE) |
608 | 609 | { |
609 | 610 | if (system.IsWii() && port < 4) |
| 611 | + { |
| 612 | + Config::SetBaseOrCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::None); |
610 | 613 | WiimoteCommon::OnSourceChanged(port, WiimoteSource::None); |
| 614 | + } |
611 | 615 |
|
612 | 616 | if (!system.IsWii() || !altGCPorts) |
613 | 617 | { |
@@ -983,28 +987,33 @@ void retro_set_controller_port_device_wii(unsigned port, unsigned device) |
983 | 987 | { |
984 | 988 | case RETRO_DEVICE_WIIMOTE: |
985 | 989 | wmExtension->SetSelectedAttachment(ExtensionNumber::NONE); |
| 990 | + Config::SetBaseOrCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::Emulated); |
986 | 991 | WiimoteCommon::OnSourceChanged(port, WiimoteSource::Emulated); |
987 | 992 | break; |
988 | 993 |
|
989 | 994 | case RETRO_DEVICE_WIIMOTE_SW: |
990 | 995 | wmExtension->SetSelectedAttachment(ExtensionNumber::NONE); |
991 | 996 | static_cast<ControllerEmu::NumericSetting<bool>*>(wmOptions->numeric_settings[3].get()) |
992 | 997 | ->SetValue(true); // Sideways Wiimote |
| 998 | + Config::SetBaseOrCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::Emulated); |
993 | 999 | WiimoteCommon::OnSourceChanged(port, WiimoteSource::Emulated); |
994 | 1000 | break; |
995 | 1001 |
|
996 | 1002 | case RETRO_DEVICE_WIIMOTE_NC: |
997 | 1003 | wmExtension->SetSelectedAttachment(ExtensionNumber::NUNCHUK); |
| 1004 | + Config::SetBaseOrCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::Emulated); |
998 | 1005 | WiimoteCommon::OnSourceChanged(port, WiimoteSource::Emulated); |
999 | 1006 | break; |
1000 | 1007 |
|
1001 | 1008 | case RETRO_DEVICE_WIIMOTE_CC: |
1002 | 1009 | case RETRO_DEVICE_WIIMOTE_CC_PRO: |
1003 | 1010 | wmExtension->SetSelectedAttachment(ExtensionNumber::CLASSIC); |
| 1011 | + Config::SetBaseOrCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::Emulated); |
1004 | 1012 | WiimoteCommon::OnSourceChanged(port, WiimoteSource::Emulated); |
1005 | 1013 | break; |
1006 | 1014 |
|
1007 | 1015 | case RETRO_DEVICE_REAL_WIIMOTE: |
| 1016 | + Config::SetBaseOrCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::Real); |
1008 | 1017 | WiimoteCommon::OnSourceChanged(port, WiimoteSource::Real); |
1009 | 1018 | break; |
1010 | 1019 | } |
|
0 commit comments