all repos — mgba @ 893fdd383f3f4f59de31ac617bc8a28d3f8059c6

mGBA Game Boy Advance Emulator

Qt: Fix command line debugger closing second game
Vicki Pfau vi@endrift.com
Sun, 23 Jul 2017 00:01:18 -0700
commit

893fdd383f3f4f59de31ac617bc8a28d3f8059c6

parent

a77c021a85be42a8fb9181cb53f1aa3a7f76546a

2 files changed, 9 insertions(+), 4 deletions(-)

jump to
M CHANGESCHANGES

@@ -5,6 +5,7 @@ Bugfixes:

- GB Audio: Make audio unsigned with bias (fixes mgba.io/i/749) - Python: Fix importing .gb or .gba before .core - GBA: Reset active region as needed when loading a ROM + - Qt: Fix command line debugger closing second game Misc: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
M src/platform/qt/DebuggerConsoleController.cppsrc/platform/qt/DebuggerConsoleController.cpp

@@ -39,8 +39,10 @@ m_cond.wakeOne();

} void DebuggerConsoleController::detach() { - m_lines.append(QString()); - m_cond.wakeOne(); + if (m_cliDebugger.d.state != DEBUGGER_SHUTDOWN) { + m_lines.append(QString()); + m_cond.wakeOne(); + } DebuggerController::detach(); }

@@ -68,8 +70,10 @@

void DebuggerConsoleController::deinit(struct CLIDebuggerBackend* be) { Backend* consoleBe = reinterpret_cast<Backend*>(be); DebuggerConsoleController* self = consoleBe->self; - self->m_lines.append(QString()); - self->m_cond.wakeOne(); + if (be->p->d.state != DEBUGGER_SHUTDOWN) { + self->m_lines.append(QString()); + self->m_cond.wakeOne(); + } } const char* DebuggerConsoleController::readLine(struct CLIDebuggerBackend* be, size_t* len) {