From 235539a3313b5d9725dfee8c57c74d2ca9203d51 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sat, 24 Oct 2020 15:21:19 -0230 Subject: [PATCH] Revert change in serial port autodetection that was causing the real serial port to not be found. --- src/emucore/OSystem.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/emucore/OSystem.cxx b/src/emucore/OSystem.cxx index 611439e45..497ebb8e0 100644 --- a/src/emucore/OSystem.cxx +++ b/src/emucore/OSystem.cxx @@ -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;