From ebfc207d3e80987cacbd285f9bc059b3207d5d6f Mon Sep 17 00:00:00 2001 From: stephena Date: Sat, 24 Jan 2015 16:28:06 +0000 Subject: [PATCH] Fixed bug in closing SerialPort explicitly; it takes care of closing itself. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3142 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- Changes.txt | 10 ++++++++-- src/emucore/AtariVox.cxx | 1 - src/emucore/SerialPort.hxx | 11 ++++++----- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Changes.txt b/Changes.txt index efd0045b1..533c53aa3 100644 --- a/Changes.txt +++ b/Changes.txt @@ -12,6 +12,14 @@ Release History =========================================================================== +4.5 to 4.6: (January 1, 2015) + + * Fixed bug when running ROMs using AtariVox controllers; the app would + crash upon exiting the ROM. + +-Have fun! + + 4.2 to 4.5: (January 1, 2015) * The conversion to C++11 has begun :) From this point on, to build @@ -59,8 +67,6 @@ * Updated included PNG library to latest stable version. --Have fun! - 4.1.1 to 4.2: (October 28, 2014) diff --git a/src/emucore/AtariVox.cxx b/src/emucore/AtariVox.cxx index c1d5fbd75..58d574e59 100644 --- a/src/emucore/AtariVox.cxx +++ b/src/emucore/AtariVox.cxx @@ -48,7 +48,6 @@ AtariVox::AtariVox(Jack jack, const Event& event, const System& system, // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AtariVox::~AtariVox() { - mySerialPort.closePort(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/SerialPort.hxx b/src/emucore/SerialPort.hxx index a40da27f8..d4180ad7c 100644 --- a/src/emucore/SerialPort.hxx +++ b/src/emucore/SerialPort.hxx @@ -44,11 +44,6 @@ class SerialPort */ virtual bool openPort(const string& device) { return false; } - /** - Close a previously opened serial port. - */ - virtual void closePort() { } - /** Read a byte from the serial port. @@ -64,6 +59,12 @@ class SerialPort @return True if a byte was written, else false */ virtual bool writeByte(const uInt8* data) { return false; } + + private: + /** + Close a previously opened serial port. + */ + virtual void closePort() { } }; #endif