Qt: Fix backup load state (fixes #823)

This commit is contained in:
Vicki Pfau 2017-07-25 11:15:08 -07:00
parent 9de2189b2e
commit a7fb446029
2 changed files with 4 additions and 1 deletions

View File

@ -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();

View File

@ -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;