Qt: Fix saving named states breaking when screenshot states disabled (fixes #3320)

This commit is contained in:
Vicki Pfau 2024-10-20 18:04:30 -07:00
parent c143851916
commit 30897fee62
2 changed files with 2 additions and 1 deletions

View File

@ -18,6 +18,7 @@ Other fixes:
- GBA Memory: Let raw access read high MMIO addresses
- Qt: Fix crash when applying changes to GB I/O registers in I/O view
- Qt: Fix LCDC background priority/enable bit being mis-mapped in I/O view
- Qt: Fix saving named states breaking when screenshot states disabled (fixes mgba.io/i/3320)
- Updater: Fix updating appimage across filesystems
Misc:
- Qt: Make window corners square on Windows 11 (fixes mgba.io/i/3285)

View File

@ -702,7 +702,7 @@ void CoreController::saveState(const QString& path, int flags) {
vf->read(vf, controller->m_backupSaveState.data(), controller->m_backupSaveState.size());
vf->close(vf);
}
vf = VFileDevice::open(controller->m_statePath, O_WRONLY | O_CREAT | O_TRUNC);
vf = VFileDevice::open(controller->m_statePath, O_RDWR | O_CREAT | O_TRUNC);
if (!vf) {
return;
}