Skip to content

Commit

Permalink
Ouch!
Browse files Browse the repository at this point in the history
  • Loading branch information
Wohlstand committed May 9, 2024
1 parent 6c7946a commit 3c5652e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/opl/chips/opl_serial_misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 27,7 @@
#include <unistd.h>
#include <cstring>
#include <cstdio>
#include <errno.h>
#endif

#ifdef _WIN32
Expand Down
8 changes: 4 additions & 4 deletions src/opl/chips/opl_serial_port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 18,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "opl_serial_port.h"

#ifdef ENABLE_HW_OPL_SERIAL_PORT

#include "opl_serial_port.h"
#include "opl_serial_misc.h"


Expand Down Expand Up @@ -68,19 68,19 @@ static size_t retrowave_protocol_serial_pack(const uint8_t *buf_in, size_t len_i
}

OPL_SerialPort::OPL_SerialPort()
: m_port(nullptr), m_protocol(ProtocolUnknown)
: m_port(NULL), m_protocol(ProtocolUnknown)
{}

OPL_SerialPort::~OPL_SerialPort()
{
delete m_port;
m_port = nullptr;
m_port = NULL;
}

bool OPL_SerialPort::connectPort(const std::string& name, unsigned baudRate, unsigned protocol)
{
delete m_port;
m_port = nullptr;
m_port = NULL;

// ensure audio thread reads protocol atomically and in order,
// so chipType() will be correct after the port is live
Expand Down

0 comments on commit 3c5652e

Please sign in to comment.