| 767 | } |
| 768 | |
| 769 | static std::string locateParamSfoPath(std::string_view root) { |
| 770 | if (std::filesystem::is_regular_file(root)) { |
| 771 | return std::string(root); |
| 772 | } |
| 773 | |
| 774 | for (auto suffix : { |
| 775 | "/PARAM.SFO", |
| 776 | "/PS3_GAME/PARAM.SFO", |
| 777 | }) { |
| 778 | auto tryPath = std::string(root); |
| 779 | tryPath += suffix; |
| 780 | |
| 781 | if (std::filesystem::is_regular_file(tryPath)) { |
| 782 | return tryPath; |
| 783 | } |
| 784 | } |
| 785 | |
| 786 | return {}; |
| 787 | } |
| 788 | |
| 789 | static std::optional<GameInfo> |
| 790 | fetchGameInfo(const psf::registry &psf, |
no test coverage detected