mirror of https://github.com/stella-emu/stella.git
Revert "Revert change in serial port autodetection that was causing the real serial port to not be found."
This reverts commit 235539a331
.
The previous code works better for our use case.
This commit is contained in:
parent
235539a331
commit
14477ac80c
|
@ -193,9 +193,10 @@ bool OSystem::create()
|
||||||
// Detect serial port for AtariVox-USB
|
// Detect serial port for AtariVox-USB
|
||||||
// If a previously set port is defined, use it;
|
// If a previously set port is defined, use it;
|
||||||
// otherwise use the first one found (if any)
|
// otherwise use the first one found (if any)
|
||||||
StringList ports = MediaFactory::createSerialPort()->portNames();
|
const string& avoxport = mySettings->getString("avoxport");
|
||||||
bool oldPortFound = BSPF::contains(ports, mySettings->getString("avoxport"));
|
const StringList ports = MediaFactory::createSerialPort()->portNames();
|
||||||
if(!oldPortFound && ports.size() > 0)
|
|
||||||
|
if(avoxport.empty() && ports.size() > 0)
|
||||||
mySettings->setValue("avoxport", ports[0]);
|
mySettings->setValue("avoxport", ports[0]);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue