Compare commits

...

3 Commits

Author SHA1 Message Date
GregoireLD
f079812516
Merge a800e8a381 into d1ef4d5cc1 2024-11-10 15:03:43 +01:00
GregoireLD
a800e8a381
Merge branch 'dolphin-emu:master' into master 2024-02-06 10:45:23 +01:00
Gregoire L. D.
8c2435895b Changing SIDevice into SerialDevice with full backward compatibility 2024-02-04 23:48:50 +01:00
3 changed files with 35 additions and 12 deletions

View File

@ -27,10 +27,10 @@ enum class IntSetting(
MAIN_SLOT_B(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SlotB", 255),
MAIN_SERIAL_PORT_1(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SerialPort1", 255),
MAIN_FALLBACK_REGION(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "FallbackRegion", 2),
MAIN_SI_DEVICE_0(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SIDevice0", 6),
MAIN_SI_DEVICE_1(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SIDevice1", 0),
MAIN_SI_DEVICE_2(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SIDevice2", 0),
MAIN_SI_DEVICE_3(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SIDevice3", 0),
MAIN_SI_DEVICE_0(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SerialDevice1", 6),
MAIN_SI_DEVICE_1(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SerialDevice2", 0),
MAIN_SI_DEVICE_2(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SerialDevice3", 0),
MAIN_SI_DEVICE_3(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SerialDevice4", 0),
MAIN_AUDIO_VOLUME(Settings.FILE_DOLPHIN, Settings.SECTION_INI_DSP, "Volume", 100),
MAIN_OVERLAY_GC_CONTROLLER(
Settings.FILE_DOLPHIN,

View File

@ -145,16 +145,35 @@ const Info<std::string> MAIN_BBA_BUILTIN_IP{{System::Main, "Core", "BBA_BUILTIN_
const Info<SerialInterface::SIDevices>& GetInfoForSIDevice(int channel)
{
// Added on 2022-03-07 to migrate parameters, remove will be possible in a future version
static const std::array<const Info<SerialInterface::SIDevices>, 4> infos{
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SIDevice0"},
SerialInterface::SIDEVICE_GC_CONTROLLER},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SIDevice1"},
SerialInterface::SIDEVICE_NONE},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SIDevice2"},
SerialInterface::SIDEVICE_NONE},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SIDevice3"},
SerialInterface::SIDEVICE_NONE},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SerialDevice1"},
Config::Get(Info<SerialInterface::SIDevices>{
{System::Main, "Core", "SIDevice0"},SerialInterface::SIDEVICE_GC_CONTROLLER})},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SerialDevice2"},
Config::Get(Info<SerialInterface::SIDevices>{
{System::Main, "Core", "SIDevice1"},SerialInterface::SIDEVICE_NONE})},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SerialDevice3"},
Config::Get(Info<SerialInterface::SIDevices>{
{System::Main, "Core", "SIDevice2"},SerialInterface::SIDEVICE_NONE})},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SerialDevice4"},
Config::Get(Info<SerialInterface::SIDevices>{
{System::Main, "Core", "SIDevice3"},SerialInterface::SIDEVICE_NONE})},
};
// Next version that will replace the above
/*
static const std::array<const Info<SerialInterface::SIDevices>, 4> infos{
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SerialDevice1"},
SerialInterface::SIDEVICE_GC_CONTROLLER},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SerialDevice2"},
SerialInterface::SIDEVICE_NONE},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SerialDevice3"},
SerialInterface::SIDEVICE_NONE},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SerialDevice4"},
SerialInterface::SIDEVICE_NONE},
};*/
return infos[channel];
}

View File

@ -76,6 +76,10 @@ static const INIToLocationMap& GetINIToLocationMap()
{{"Wii", "Language"}, {Config::SYSCONF_LANGUAGE.GetLocation()}},
{{"Core", "HLE_BS2"}, {Config::MAIN_SKIP_IPL.GetLocation()}},
{{"Core", "GameCubeLanguage"}, {Config::MAIN_GC_LANGUAGE.GetLocation()}},
{{"Core", "SIDevice0"}, {Config::GetInfoForSIDevice(0).GetLocation()}},
{{"Core", "SIDevice1"}, {Config::GetInfoForSIDevice(1).GetLocation()}},
{{"Core", "SIDevice2"}, {Config::GetInfoForSIDevice(2).GetLocation()}},
{{"Core", "SIDevice3"}, {Config::GetInfoForSIDevice(3).GetLocation()}},
{{"Controls", "PadType0"}, {Config::GetInfoForSIDevice(0).GetLocation()}},
{{"Controls", "PadType1"}, {Config::GetInfoForSIDevice(1).GetLocation()}},
{{"Controls", "PadType2"}, {Config::GetInfoForSIDevice(2).GetLocation()}},