mirror of
https://github.com/libretro/mgba.git
synced 2024-11-27 02:00:42 +00:00
Qt: Disable sync while running scripts from main thread (fixes #2738)
This commit is contained in:
parent
dbffb46c4e
commit
6d8060034f
1
CHANGES
1
CHANGES
@ -7,6 +7,7 @@ Emulation fixes:
|
||||
- GBA Video: Disable BG target 1 blending when OBJ blending (fixes mgba.io/i/2722)
|
||||
Other fixes:
|
||||
- Qt: Fix crash when attempting to use OpenGL 2.1 to 3.1 (fixes mgba.io/i/2794)
|
||||
- Qt: Disable sync while running scripts from main thread (fixes mgba.io/i/2738)
|
||||
Misc:
|
||||
- GB Serialize: Add missing savestate support for MBC6 and NT (newer)
|
||||
- GBA: Improve detection of valid ELF ROMs
|
||||
|
@ -5,6 +5,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
#include "scripting/ScriptingController.h"
|
||||
|
||||
#include "AudioProcessor.h"
|
||||
#include "CoreController.h"
|
||||
#include "scripting/ScriptingTextBuffer.h"
|
||||
#include "scripting/ScriptingTextBufferModel.h"
|
||||
@ -73,11 +74,20 @@ bool ScriptingController::load(VFileDevice& vf, const QString& name) {
|
||||
}
|
||||
QByteArray utf8 = name.toUtf8();
|
||||
CoreController::Interrupter interrupter(m_controller);
|
||||
if (m_controller) {
|
||||
m_controller->setSync(false);
|
||||
m_controller->unpaused();
|
||||
}
|
||||
bool ok = true;
|
||||
if (!m_activeEngine->load(m_activeEngine, utf8.constData(), vf) || !m_activeEngine->run(m_activeEngine)) {
|
||||
emit error(QString::fromUtf8(m_activeEngine->getError(m_activeEngine)));
|
||||
return false;
|
||||
ok = false;
|
||||
}
|
||||
return true;
|
||||
if (m_controller && m_controller->isPaused()) {
|
||||
m_controller->setSync(true);
|
||||
m_controller->paused();
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void ScriptingController::clearController() {
|
||||
|
Loading…
Reference in New Issue
Block a user