mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-24 19:36:17 +00:00
Resubmit - Prevent settings from being saved when close button is pressed instead of save (#1747)
* Do not save settings when close button pressed instead of save
* Update src/common/config.h
Co-authored-by: TheTurtle <geoster3d@gmail.com>
* Revert "Update src/common/config.h"
This reverts commit 125303ea86
.
---------
Co-authored-by: rainmakerv2 <30595646+jpau02@users.noreply.github.com>
Co-authored-by: TheTurtle <geoster3d@gmail.com>
This commit is contained in:
parent
2a19d915e8
commit
3f1061de56
6 changed files with 194 additions and 163 deletions
|
@ -35,7 +35,7 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), ui(new Ui::MainWi
|
|||
MainWindow::~MainWindow() {
|
||||
SaveWindowState();
|
||||
const auto config_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir);
|
||||
Config::save(config_dir / "config.toml");
|
||||
Config::saveMainWindow(config_dir / "config.toml");
|
||||
}
|
||||
|
||||
bool MainWindow::Init() {
|
||||
|
@ -1006,7 +1006,7 @@ void MainWindow::AddRecentFiles(QString filePath) {
|
|||
}
|
||||
Config::setRecentFiles(vec);
|
||||
const auto config_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir);
|
||||
Config::save(config_dir / "config.toml");
|
||||
Config::saveMainWindow(config_dir / "config.toml");
|
||||
CreateRecentGameActions(); // Refresh the QActions.
|
||||
}
|
||||
|
||||
|
@ -1077,4 +1077,4 @@ bool MainWindow::eventFilter(QObject* obj, QEvent* event) {
|
|||
}
|
||||
}
|
||||
return QMainWindow::eventFilter(obj, event);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue