mirror of https://github.com/mgba-emu/mgba.git
Qt: Reattach video backend when resetting scripts (fixes #3167)
This commit is contained in:
parent
776d52a2c6
commit
c80f3afd77
|
@ -92,6 +92,7 @@ void ScriptingController::setInputController(InputController* input) {
|
|||
}
|
||||
|
||||
void ScriptingController::setVideoBackend(VideoBackend* backend) {
|
||||
m_videoBackend = backend;
|
||||
mScriptCanvasUpdateBackend(&m_scriptContext, backend);
|
||||
}
|
||||
|
||||
|
@ -339,6 +340,7 @@ void ScriptingController::init() {
|
|||
|
||||
mScriptContextAttachLogger(&m_scriptContext, &m_logger);
|
||||
m_bufferModel->attachToContext(&m_scriptContext);
|
||||
mScriptCanvasUpdateBackend(&m_scriptContext, m_videoBackend);
|
||||
|
||||
HashTableEnumerate(&m_scriptContext.engines, [](const char* key, void* engine, void* context) {
|
||||
ScriptingController* self = static_cast<ScriptingController*>(context);
|
||||
|
|
|
@ -87,6 +87,7 @@ private:
|
|||
mScriptEngineContext* m_activeEngine = nullptr;
|
||||
QHash<QString, mScriptEngineContext*> m_engines;
|
||||
ScriptingTextBufferModel* m_bufferModel;
|
||||
VideoBackend* m_videoBackend = nullptr;
|
||||
|
||||
mScriptGamepad m_gamepad;
|
||||
|
||||
|
|
Loading…
Reference in New Issue