mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-22 10:04:39 +00:00
qt: Update save data dir open to use name from PSF. (#2954)
This commit is contained in:
parent
5eb58799fe
commit
034ae8cffa
@ -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…
Reference in New Issue
Block a user