mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix crash when loading a game after stopping GDB server
This commit is contained in:
parent
9b8b56d701
commit
a7985c39ac
1
CHANGES
1
CHANGES
|
@ -46,6 +46,7 @@ Bugfixes:
|
||||||
- Qt: Fix crash when starting GDB stub after closing a game
|
- Qt: Fix crash when starting GDB stub after closing a game
|
||||||
- Qt: Fix patch loading while a game is running
|
- Qt: Fix patch loading while a game is running
|
||||||
- Util: Fix sockets on Windows
|
- Util: Fix sockets on Windows
|
||||||
|
- Qt: Fix crash when loading a game after stopping GDB server
|
||||||
Misc:
|
Misc:
|
||||||
- GBA Audio: Change internal audio sample buffer from 32-bit to 16-bit samples
|
- GBA Audio: Change internal audio sample buffer from 32-bit to 16-bit samples
|
||||||
- GBA Memory: Simplify memory API and use fixed bus width
|
- GBA Memory: Simplify memory API and use fixed bus width
|
||||||
|
|
|
@ -43,14 +43,16 @@ void GDBController::attach() {
|
||||||
if (m_gameController->isLoaded()) {
|
if (m_gameController->isLoaded()) {
|
||||||
ARMDebuggerEnter(&m_gdbStub.d, DEBUGGER_ENTER_ATTACHED, 0);
|
ARMDebuggerEnter(&m_gdbStub.d, DEBUGGER_ENTER_ATTACHED, 0);
|
||||||
} else {
|
} else {
|
||||||
connect(m_gameController, &GameController::gameStarted, [this] () {
|
QObject::disconnect(m_autoattach);
|
||||||
disconnect(m_gameController);
|
m_autoattach = connect(m_gameController, &GameController::gameStarted, [this] () {
|
||||||
|
QObject::disconnect(m_autoattach);
|
||||||
ARMDebuggerEnter(&m_gdbStub.d, DEBUGGER_ENTER_ATTACHED, 0);
|
ARMDebuggerEnter(&m_gdbStub.d, DEBUGGER_ENTER_ATTACHED, 0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GDBController::detach() {
|
void GDBController::detach() {
|
||||||
|
QObject::disconnect(m_autoattach);
|
||||||
if (!isAttached()) {
|
if (!isAttached()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,8 @@ private:
|
||||||
|
|
||||||
ushort m_port;
|
ushort m_port;
|
||||||
Address m_bindAddress;
|
Address m_bindAddress;
|
||||||
|
|
||||||
|
QMetaObject::Connection m_autoattach;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue