mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix backup load state (fixes #823)
This commit is contained in:
parent
9de2189b2e
commit
a7fb446029
|
@ -408,7 +408,7 @@ void CoreController::loadState(int slot) {
|
|||
if (!controller->m_backupLoadState.isOpen()) {
|
||||
controller->m_backupLoadState = VFileMemChunk(nullptr, 0);
|
||||
}
|
||||
mCoreLoadStateNamed(context->core, controller->m_backupLoadState, controller->m_saveStateFlags);
|
||||
mCoreSaveStateNamed(context->core, controller->m_backupLoadState, controller->m_saveStateFlags);
|
||||
if (mCoreLoadState(context->core, controller->m_stateSlot, controller->m_loadStateFlags)) {
|
||||
emit controller->frameAvailable();
|
||||
emit controller->stateLoaded();
|
||||
|
|
|
@ -20,6 +20,9 @@ VFileDevice::VFileDevice(VFile* vf, QObject* parent)
|
|||
}
|
||||
|
||||
void VFileDevice::close() {
|
||||
if (!m_vf) {
|
||||
return;
|
||||
}
|
||||
QIODevice::close();
|
||||
m_vf->close(m_vf);
|
||||
m_vf = nullptr;
|
||||
|
|
Loading…
Reference in New Issue