mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 13:48:40 +00:00
more settings porting
This commit is contained in:
10
src/main.cpp
10
src/main.cpp
@@ -134,7 +134,7 @@ int main(int argc, char* argv[]) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Config::addGameInstallDir(config_path);
|
||||
EmulatorSettings::GetInstance()->AddGameInstallDir(config_path);
|
||||
Config::save(Common::FS::GetUserPath(Common::FS::PathType::UserDir) / "config.toml");
|
||||
std::cout << "Game folder successfully saved.\n";
|
||||
exit(0);
|
||||
@@ -153,8 +153,8 @@ int main(int argc, char* argv[]) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Config::setAddonInstallDir(config_path);
|
||||
Config::save(Common::FS::GetUserPath(Common::FS::PathType::UserDir) / "config.toml");
|
||||
EmulatorSettings::GetInstance()->SetAddonInstallDir(config_path);
|
||||
EmulatorSettings::GetInstance()->Save();
|
||||
std::cout << "Addon folder successfully saved.\n";
|
||||
exit(0);
|
||||
}},
|
||||
@@ -220,7 +220,7 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
// If no game directory is set and no command line argument, prompt for it
|
||||
if (Config::getGameInstallDirs().empty()) {
|
||||
if (EmulatorSettings::GetInstance()->GetGameInstallDirs().empty()) {
|
||||
std::cerr << "Warning: No game folder set, please set it by calling shadps4"
|
||||
" with the --add-game-folder <folder_name> argument\n";
|
||||
}
|
||||
@@ -238,7 +238,7 @@ int main(int argc, char* argv[]) {
|
||||
// If not a file, treat it as a game ID and search in install directories recursively
|
||||
bool game_found = false;
|
||||
const int max_depth = 5;
|
||||
for (const auto& install_dir : Config::getGameInstallDirs()) {
|
||||
for (const auto& install_dir : EmulatorSettings::GetInstance()->GetGameInstallDirs()) {
|
||||
if (auto found_path = Common::FS::FindGameByID(install_dir, game_path, max_depth)) {
|
||||
eboot_path = *found_path;
|
||||
game_found = true;
|
||||
|
||||
Reference in New Issue
Block a user