Revert change in serial port autodetection that was causing the real serial port to not be found.

This commit is contained in:
Stephen Anthony 2020-10-24 15:21:19 -02:30
parent 0a0328b126
commit e8514ca145
1 changed files with 3 additions and 4 deletions

View File

@ -193,10 +193,9 @@ bool OSystem::create()
// Detect serial port for AtariVox-USB
// If a previously set port is defined, use it;
// otherwise use the first one found (if any)
const string& avoxport = mySettings->getString("avoxport");
const StringList ports = MediaFactory::createSerialPort()->portNames();
if(avoxport.empty() && ports.size() > 0)
StringList ports = MediaFactory::createSerialPort()->portNames();
bool oldPortFound = BSPF::contains(ports, mySettings->getString("avoxport"));
if(!oldPortFound && ports.size() > 0)
mySettings->setValue("avoxport", ports[0]);
return true;