static bool ReadPortType(const ProfileMap &map, unsigned n, DeviceConfig::PortType &type) { char name[64]; MakeDeviceSettingName(name, "Port", n, "Type"); const char *value = map.Get(name); return value != NULL && StringToPortType(value, type); }
static enum DeviceConfig::port_type ReadPortType(unsigned n) { TCHAR name[64], value[64]; MakeDeviceSettingName(name, CONF("Port"), n, _T("Type")); if (!Profile::Get(name, value, sizeof(value) / sizeof(value[0]))) return DeviceConfig::SERIAL; return StringToPortType(value); }
static DeviceConfig::PortType ReadPortType(unsigned n) { TCHAR name[64], value[64]; MakeDeviceSettingName(name, _T("Port"), n, _T("Type")); if (!Profile::Get(name, value, ARRAY_SIZE(value))) return n == 0 ? (IsAndroid() ? DeviceConfig::PortType::INTERNAL : DeviceConfig::PortType::SERIAL) : DeviceConfig::PortType::DISABLED; return StringToPortType(value); }