mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-29 23:03:18 +00:00
Fix user data path on macOS.
This commit is contained in:
parent
225ca3ac5b
commit
43c0f313f2
2 changed files with 38 additions and 10 deletions
|
@ -18,16 +18,9 @@ int main(int argc, char* argv[]) {
|
|||
QApplication a(argc, argv);
|
||||
|
||||
// Load configurations and initialize Qt application
|
||||
const auto config_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir);
|
||||
Config::load(config_dir / "config.toml");
|
||||
QString gameDataPath = QDir::currentPath() + "/user/game_data/";
|
||||
std::string stdStr = gameDataPath.toStdString();
|
||||
std::filesystem::path path(stdStr);
|
||||
#ifdef _WIN64
|
||||
std::wstring wstdStr = gameDataPath.toStdWString();
|
||||
path = std::filesystem::path(wstdStr);
|
||||
#endif
|
||||
std::filesystem::create_directory(path);
|
||||
const auto user_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir);
|
||||
Config::load(user_dir / "config.toml");
|
||||
std::filesystem::create_directory(user_dir / "game_data");
|
||||
|
||||
// Check if the game install directory is set
|
||||
if (Config::getGameInstallDir() == "") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue