mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-14 14:43:15 +00:00
qt: Update save data dir open to use name from PSF. (#2954)
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / windows-qt (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / macos-qt (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-qt (push) Has been cancelled
Build and Release / linux-sdl-gcc (push) Has been cancelled
Build and Release / linux-qt-gcc (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / windows-qt (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / macos-qt (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-qt (push) Has been cancelled
Build and Release / linux-sdl-gcc (push) Has been cancelled
Build and Release / linux-qt-gcc (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
This commit is contained in:
parent
5eb58799fe
commit
034ae8cffa
3 changed files with 7 additions and 1 deletions
|
@ -79,6 +79,11 @@ public:
|
||||||
if (const auto play_time = psf.GetString("PLAY_TIME"); play_time.has_value()) {
|
if (const auto play_time = psf.GetString("PLAY_TIME"); play_time.has_value()) {
|
||||||
game.play_time = *play_time;
|
game.play_time = *play_time;
|
||||||
}
|
}
|
||||||
|
if (const auto save_dir = psf.GetString("INSTALL_DIR_SAVEDATA"); save_dir.has_value()) {
|
||||||
|
game.save_dir = *save_dir;
|
||||||
|
} else {
|
||||||
|
game.save_dir = game.serial;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return game;
|
return game;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ struct GameInfo {
|
||||||
std::string version = "Unknown";
|
std::string version = "Unknown";
|
||||||
std::string region = "Unknown";
|
std::string region = "Unknown";
|
||||||
std::string fw = "Unknown";
|
std::string fw = "Unknown";
|
||||||
|
std::string save_dir = "Unknown";
|
||||||
|
|
||||||
std::string play_time = "Unknown";
|
std::string play_time = "Unknown";
|
||||||
CompatibilityEntry compatibility = CompatibilityEntry{CompatibilityStatus::Unknown};
|
CompatibilityEntry compatibility = CompatibilityEntry{CompatibilityStatus::Unknown};
|
||||||
|
|
|
@ -160,7 +160,7 @@ public:
|
||||||
Common::FS::PathToQString(userPath,
|
Common::FS::PathToQString(userPath,
|
||||||
Common::FS::GetUserPath(Common::FS::PathType::UserDir));
|
Common::FS::GetUserPath(Common::FS::PathType::UserDir));
|
||||||
QString saveDataPath =
|
QString saveDataPath =
|
||||||
userPath + "/savedata/1/" + QString::fromStdString(m_games[itemID].serial);
|
userPath + "/savedata/1/" + QString::fromStdString(m_games[itemID].save_dir);
|
||||||
QDir(saveDataPath).mkpath(saveDataPath);
|
QDir(saveDataPath).mkpath(saveDataPath);
|
||||||
QDesktopServices::openUrl(QUrl::fromLocalFile(saveDataPath));
|
QDesktopServices::openUrl(QUrl::fromLocalFile(saveDataPath));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue