-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add RPCS3/games/ for automatic games detection, support PSN games outside HDD0 #12982
Conversation
elad335
commented
Nov 26, 2022
•
edited
Loading
edited
- Create a directory called "games" in RPCS3 program directory which disc games can be put and automatically be added to the games list.
- Support PSN games outside of /dev_hdd0/game. Technically RPCS3 never forbid it, it just crashed most of the time when attempting to load them. Updates are not installed for it. (meaning it can be used as a backup in case updating fails)
- Do not load PARAM.SFO with TITLE_ID that has non-alphabetic or non-digits characters, this is to protect from potential malware files with special filesystem redirections.
7859fb4
to
acebbe6
Compare
constexpr auto game0_path = "/dev_hdd0/game/"sv; | ||
|
||
if (argv[0].starts_with(game0_path) && !fs::is_file(vfs::get(argv[0]))) | ||
{ | ||
std::string title_id = argv[0].substr(game0_path.size()); | ||
title_id = title_id.substr(0, title_id.find_last_not_of('/')); | ||
|
||
// Try to load game directory from list if available | ||
if (auto node = (title_id.empty() ? YAML::Node{} : games[title_id])) | ||
{ | ||
disc = node.Scalar(); | ||
m_path = disc + argv[0].substr(game0_path.size() + title_id.size()); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tries to find the digital game in games.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for savestates, savestates save only guest path so it needs to deal with it by trying to find the game in places it can be. (that's how disc games are handled as well)