diff --git a/src/xenia/emulator.cc b/src/xenia/emulator.cc index 946fe1036..2f8f2b788 100644 --- a/src/xenia/emulator.cc +++ b/src/xenia/emulator.cc @@ -398,13 +398,13 @@ X_STATUS Emulator::MountPath(const std::filesystem::path& path, return X_STATUS_NO_SUCH_FILE; } - file_system_->UnregisterSymbolicLink(kDefaultPartitonSymbolicLink); + file_system_->UnregisterSymbolicLink(kDefaultPartitionSymbolicLink); file_system_->UnregisterSymbolicLink(kDefaultGameSymbolicLink); file_system_->UnregisterSymbolicLink("plugins:"); // Create symlinks to the device. file_system_->RegisterSymbolicLink(kDefaultGameSymbolicLink, mount_path); - file_system_->RegisterSymbolicLink(kDefaultPartitonSymbolicLink, mount_path); + file_system_->RegisterSymbolicLink(kDefaultPartitionSymbolicLink, mount_path); return X_STATUS_SUCCESS; } @@ -875,14 +875,14 @@ std::string Emulator::FindLaunchModule() { // Remove previous symbolic links. // Some titles can provide root within specific directory. kernel_state_->file_system()->UnregisterSymbolicLink( - kDefaultPartitonSymbolicLink); + kDefaultPartitionSymbolicLink); kernel_state_->file_system()->UnregisterSymbolicLink( kDefaultGameSymbolicLink); file_path /= std::filesystem::path(xam->loader_data().launch_path); kernel_state_->file_system()->RegisterSymbolicLink( - kDefaultPartitonSymbolicLink, + kDefaultPartitionSymbolicLink, xe::path_to_utf8(file_path.parent_path())); kernel_state_->file_system()->RegisterSymbolicLink( kDefaultGameSymbolicLink, xe::path_to_utf8(file_path.parent_path())); diff --git a/src/xenia/emulator.h b/src/xenia/emulator.h index adc7e4d7e..6a8a7db71 100644 --- a/src/xenia/emulator.h +++ b/src/xenia/emulator.h @@ -53,7 +53,7 @@ namespace xe { constexpr fourcc_t kEmulatorSaveSignature = make_fourcc("XSAV"); static const std::string kDefaultGameSymbolicLink = "GAME:"; -static const std::string kDefaultPartitonSymbolicLink = "D:"; +static const std::string kDefaultPartitionSymbolicLink = "D:"; // The main type that runs the whole emulator. // This is responsible for initializing and managing all the various subsystems. diff --git a/src/xenia/kernel/xam/xam_module.cc b/src/xenia/kernel/xam/xam_module.cc index 5063c8f8d..888237360 100644 --- a/src/xenia/kernel/xam/xam_module.cc +++ b/src/xenia/kernel/xam/xam_module.cc @@ -110,10 +110,15 @@ void XamModule::SaveLoaderData() { std::filesystem::path host_path = loader_data_.host_path; std::string launch_path = loader_data_.launch_path; - const std::string launch_prefix = "game:\\"; - if (launch_path.compare(0, launch_prefix.length(), launch_prefix) == 0) { - launch_path = launch_path.substr(launch_prefix.length()); - } + + auto remove_prefix = [&launch_path](std::string& prefix) { + if (launch_path.compare(0, prefix.length(), prefix) == 0) { + launch_path = launch_path.substr(prefix.length()); + } + }; + + remove_prefix(std::string("game:\\")); + remove_prefix(std::string("d:\\")); if (host_path.extension() == ".xex") { host_path.remove_filename();