mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-08 19:53:15 +00:00
Multiple Install Folders (#1308)
* multiple install folders implimentation * clang format * paths setting tab * clang format
This commit is contained in:
parent
c9f894c45a
commit
56e8ed7833
11 changed files with 278 additions and 21 deletions
|
@ -51,7 +51,9 @@ QWidget* GameInstallDialog::SetupGamesDirectory() {
|
|||
// Input.
|
||||
m_gamesDirectory = new QLineEdit();
|
||||
QString install_dir;
|
||||
Common::FS::PathToQString(install_dir, Config::getGameInstallDir());
|
||||
std::filesystem::path install_path =
|
||||
Config::getGameInstallDirs().empty() ? "" : Config::getGameInstallDirs().front();
|
||||
Common::FS::PathToQString(install_dir, install_path);
|
||||
m_gamesDirectory->setText(install_dir);
|
||||
m_gamesDirectory->setMinimumWidth(400);
|
||||
|
||||
|
@ -125,7 +127,9 @@ void GameInstallDialog::Save() {
|
|||
}
|
||||
}
|
||||
|
||||
Config::setGameInstallDir(Common::FS::PathFromQString(gamesDirectory));
|
||||
std::vector<std::filesystem::path> install_dirs;
|
||||
install_dirs.emplace_back(Common::FS::PathFromQString(gamesDirectory));
|
||||
Config::setGameInstallDirs(install_dirs);
|
||||
Config::setAddonInstallDir(Common::FS::PathFromQString(addonsDirectory));
|
||||
const auto config_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir);
|
||||
Config::save(config_dir / "config.toml");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue