Add option to ignore game patch (#3039)

* impl

* fix

* cleanup

* more

* clang +

* why
This commit is contained in:
Fire Cube
2025-06-10 21:30:45 +02:00
committed by GitHub
parent e0c930f2d8
commit 9981c8df03
5 changed files with 39 additions and 28 deletions

View File

@@ -75,7 +75,7 @@ void Emulator::Run(std::filesystem::path file, const std::vector<std::string> ar
game_folder_name.ends_with("-UPDATE") || game_folder_name.ends_with("-patch")) {
// If an executable was launched from a separate update directory,
// use the base game directory as the game folder.
const auto base_name = game_folder_name.substr(0, game_folder_name.size() - 7);
const std::string base_name = game_folder_name.substr(0, game_folder_name.rfind('-'));
const auto base_path = game_folder.parent_path() / base_name;
if (std::filesystem::is_directory(base_path)) {
game_folder = base_path;