void ControllerEmu::LoadDefaults(const ControllerInterface &ciface) { // load an empty inifile section, clears everything IniFile::Section sec; LoadConfig(&sec); if (ciface.Devices().size()) { default_device.FromDevice(ciface.Devices()[0]); UpdateDefaultDevice(); } }
void ControllerEmu::LoadDefaults(const ControllerInterface& ciface) { // load an empty inifile section, clears everything IniFile::Section sec; LoadConfig(&sec); const std::string& default_device_string = ciface.GetDefaultDeviceString(); if (!default_device_string.empty()) { default_device.FromString(default_device_string); UpdateDefaultDevice(); } }