mirror of https://github.com/mgba-emu/mgba.git
Qt: Attach debugger when attaching scripting controller (fixes #3046)
This commit is contained in:
parent
dca568a0be
commit
6ecc182d7c
|
@ -77,7 +77,7 @@ void ScriptingController::setController(std::shared_ptr<CoreController> controll
|
|||
CoreController::Interrupter interrupter(m_controller);
|
||||
m_controller->thread()->scriptContext = &m_scriptContext;
|
||||
if (m_controller->hasStarted()) {
|
||||
mScriptContextAttachCore(&m_scriptContext, m_controller->thread()->core);
|
||||
attach();
|
||||
}
|
||||
updateVideoScale();
|
||||
connect(m_controller.get(), &CoreController::stopping, this, &ScriptingController::clearController);
|
||||
|
@ -154,7 +154,7 @@ void ScriptingController::reset() {
|
|||
m_activeEngine = nullptr;
|
||||
init();
|
||||
if (m_controller && m_controller->hasStarted()) {
|
||||
mScriptContextAttachCore(&m_scriptContext, m_controller->thread()->core);
|
||||
attach();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -298,6 +298,12 @@ void ScriptingController::updateGamepad() {
|
|||
}
|
||||
}
|
||||
|
||||
void ScriptingController::attach() {
|
||||
CoreController::Interrupter interrupter(m_controller);
|
||||
mScriptContextAttachCore(&m_scriptContext, m_controller->thread()->core);
|
||||
m_controller->attachDebugger(false);
|
||||
}
|
||||
|
||||
void ScriptingController::attachGamepad() {
|
||||
mScriptGamepad* pad = mScriptContextGamepadLookup(&m_scriptContext, 0);
|
||||
if (pad == &m_gamepad) {
|
||||
|
|
|
@ -67,6 +67,7 @@ protected:
|
|||
|
||||
private slots:
|
||||
void updateGamepad();
|
||||
void attach();
|
||||
|
||||
private:
|
||||
void init();
|
||||
|
|
Loading…
Reference in New Issue