mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 00:05:58 +03:00
[PR #1329] [MERGED] Slightly refactor the game install dirs code #2050
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#2050
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/1329
Author: @KrisCris
Created: 10/10/2024
Status: ✅ Merged
Merged: 10/11/2024
Merged by: @georgemoralis
Base:
main← Head:game_folder_fix📝 Commits (10+)
85c4805fix: game dir dupes on each launch420e4c0fix copy around settings_addon_install_dir vector70cb429do not show the path if it is not added01e39a4remove installDir from config fileb0e7c3dMerge branch 'main' into game_folder_fix0347c72format79f8298Merge branch 'main' into game_folder_fix13c1c34moved migration code to save, and added noticefa53fb4move ui->removeFolderButton->setEnabled to LoadValuesFromConfig4e294ddavoid checking duplicates for gameDirs loaded from config📊 Changes
4 files changed (+32 additions, -40 deletions)
View changed files
📝
src/common/config.cpp(+23 -15)📝
src/common/config.h(+3 -2)📝
src/qt_gui/game_install_dialog.cpp(+1 -4)📝
src/qt_gui/settings_dialog.cpp(+5 -19)📄 Description
Well... I think I made this PR too late (originally as a fix of https://github.com/shadps4-emu/shadPS4/issues/1325), so some of the issues have already been fixed, sorry. But here it is.
The main reason #1308 duplicates installDir is that the config is not removed from the file. (
github.com/shadps4-emu/shadPS4@01e39a4e70)Meanwhile, I replaced setGameInstallDirs with addGameInstallDir and removeGameInstallDir so no more duplicated path-adding/removing code, and avoid passing the vectors around; The return value of getGameInstallDirs is made const& so it won't be copied and modified everywhere.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.