diff --git a/stella/src/macosx/SerialPortMACOSX.cxx b/stella/src/macosx/SerialPortMACOSX.cxx index 349556129..53b8879c7 100644 --- a/stella/src/macosx/SerialPortMACOSX.cxx +++ b/stella/src/macosx/SerialPortMACOSX.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: SerialPortMACOSX.cxx,v 1.1 2008-04-14 15:12:55 stephena Exp $ +// $Id: SerialPortMACOSX.cxx,v 1.2 2008-04-14 18:50:35 stephena Exp $ //============================================================================ #include @@ -48,12 +48,13 @@ bool SerialPortMACOSX::openPort(const string& device) return false; struct termios termios; + tcgetattr(myHandle, &termios); memset(&termios, 0, sizeof(struct termios)); - - termios.c_cflag = CREAD | CLOCAL; - termios.c_cflag |= B19200; - termios.c_cflag |= CS8; - tcflush(myHandle, TCIFLUSH); + cfmakeraw(&termios); + cfsetspeed(&termios, 19200); // change to 19200 baud + termios.c_cflag = CREAD | CLOCAL; // turn on READ and ignore modem control lines + termios.c_cflag |= CS8; // 8 bit + termios.c_cflag |= CDTR_IFLOW; // inbound DTR tcsetattr(myHandle, TCSANOW, &termios); return true; diff --git a/stella/src/macosx/stella.xcodeproj/project.pbxproj b/stella/src/macosx/stella.xcodeproj/project.pbxproj index 404ffce31..529124126 100644 --- a/stella/src/macosx/stella.xcodeproj/project.pbxproj +++ b/stella/src/macosx/stella.xcodeproj/project.pbxproj @@ -1340,6 +1340,7 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; buildConfigurationList = 2D91752109BA903B0026E9FF /* Build configuration list for PBXProject "stella" */; + compatibilityVersion = "Xcode 2.4"; hasScannedForEncodings = 1; mainGroup = 29B97314FDCFA39411CA2CEA /* «PROJECTNAMEASXML» */; projectDirPath = "";