Qt: Fix command line debugger closing second game

This commit is contained in:
Vicki Pfau 2017-07-23 00:01:18 -07:00
parent 91abd41eab
commit ef1041a47f
2 changed files with 9 additions and 4 deletions

View File

@ -2,6 +2,7 @@
Bugfixes:
- 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:
- Qt: Don't rebuild library view if style hasn't changed

View File

@ -39,8 +39,10 @@ void DebuggerConsoleController::enterLine(const QString& line) {
}
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::init(struct CLIDebuggerBackend* be) {
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) {