From 30897fee629c59114a0c40d2e57125007f91f7cc Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 20 Oct 2024 18:04:30 -0700 Subject: [PATCH] Qt: Fix saving named states breaking when screenshot states disabled (fixes #3320) --- CHANGES | 1 + src/platform/qt/CoreController.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index da116a015..d5c6b6739 100644 --- a/CHANGES +++ b/CHANGES @@ -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) diff --git a/src/platform/qt/CoreController.cpp b/src/platform/qt/CoreController.cpp index fa0684466..f6281d51d 100644 --- a/src/platform/qt/CoreController.cpp +++ b/src/platform/qt/CoreController.cpp @@ -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; }