mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
HW/SerialInterface: Refactor to class.
This commit is contained in:
@ -169,9 +169,10 @@ std::string GetInputDisplay()
|
||||
s_wiimotes = {};
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
if (SerialInterface::GetDeviceType(i) == SerialInterface::SIDEVICE_GC_GBA_EMULATED)
|
||||
auto& si = Core::System::GetInstance().GetSerialInterface();
|
||||
if (si.GetDeviceType(i) == SerialInterface::SIDEVICE_GC_GBA_EMULATED)
|
||||
s_controllers[i] = ControllerType::GBA;
|
||||
else if (SerialInterface::GetDeviceType(i) != SerialInterface::SIDEVICE_NONE)
|
||||
else if (si.GetDeviceType(i) != SerialInterface::SIDEVICE_NONE)
|
||||
s_controllers[i] = ControllerType::GC;
|
||||
else
|
||||
s_controllers[i] = ControllerType::None;
|
||||
@ -484,6 +485,7 @@ void ChangePads()
|
||||
if (s_controllers == controllers)
|
||||
return;
|
||||
|
||||
auto& si = Core::System::GetInstance().GetSerialInterface();
|
||||
for (int i = 0; i < SerialInterface::MAX_SI_CHANNELS; ++i)
|
||||
{
|
||||
SerialInterface::SIDevices device = SerialInterface::SIDEVICE_NONE;
|
||||
@ -505,7 +507,7 @@ void ChangePads()
|
||||
}
|
||||
}
|
||||
|
||||
SerialInterface::ChangeDevice(device, i);
|
||||
si.ChangeDevice(device, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user