mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 07:46:01 +03:00
[PR #1747] [MERGED] Resubmit - Prevent settings from being saved when close button is pressed instead of save #2274
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#2274
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/1747
Author: @rainmakerv3
Created: 12/12/2024
Status: ✅ Merged
Merged: 12/12/2024
Merged by: @raphaelthegreat
Base:
main← Head:configsave2📝 Commits (3)
2b91091Do not save settings when close button pressed instead of save125303eUpdate src/common/config.hf484df2Revert "Update src/common/config.h"📊 Changes
6 files changed (+193 additions, -162 deletions)
View changed files
📝
src/common/config.cpp(+41 -11)📝
src/common/config.h(+3 -1)📝
src/emulator.cpp(+1 -1)📝
src/qt_gui/main_window.cpp(+3 -3)📝
src/qt_gui/settings_dialog.cpp(+143 -146)📝
src/qt_gui/settings_dialog.h(+2 -0)📄 Description
Resubmitting PR#1679 because I accidentally deleted that branch instead of the one that was merged lol.
Proposed fix for https://github.com/shadps4-emu/shadPS4/issues/1669, more detail on the issue can be seen on that page
There are actually two issues which cause settings to be saved when the close button is pressed:
MainWindow and Emulator destructor functions both call the Config::Save function, which saves every single config variable, including those changed in the config settings dialog box. To resolve this, I created another save function for just those two destructors, which save only the variables related to the main window itself, such as main window dimensions, recent files, and grid/list view settings.
Config variables are connected to each change in the config windows QT widgets, and the UI loads in these variables instead of the values saved to the config file. I rewrote this such that the config variables change value only upon saving, and that UI values are loaded from the config file
Not included in this PR is fixing how the translations are re-applied when changing emulator language.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.