diff --git a/stratosphere/loader/source/ldr_nso.cpp b/stratosphere/loader/source/ldr_nso.cpp
index 69825e06f..26e265690 100644
--- a/stratosphere/loader/source/ldr_nso.cpp
+++ b/stratosphere/loader/source/ldr_nso.cpp
@@ -285,7 +285,7 @@ Result NsoUtils::LoadNsosIntoProcessMemory(Handle process_h, u64 title_id, NsoLo
std::fill(map_base + bss_base, map_base + bss_base + bss_size, 0);
/* Apply patches to loaded module. */
- PatchUtils::ApplyPatches(title_id, &g_nso_headers[i], map_base, bss_base);
+ PatchUtils::ApplyPatches(&g_nso_headers[i], map_base, bss_base);
nso_map.Close();
diff --git a/stratosphere/loader/source/ldr_patcher.cpp b/stratosphere/loader/source/ldr_patcher.cpp
index 67520e425..569e44fcd 100644
--- a/stratosphere/loader/source/ldr_patcher.cpp
+++ b/stratosphere/loader/source/ldr_patcher.cpp
@@ -126,10 +126,10 @@ static void ApplyIpsPatch(u8 *mapped_nso, size_t mapped_size, bool is_ips32, FIL
}
}
-void PatchUtils::ApplyPatches(u64 title_id, const NsoUtils::NsoHeader *header, u8 *mapped_nso, size_t mapped_size) {
- /* Inspect all patches from /
/exefs/patches/<*>/<*>.ips. */
+void PatchUtils::ApplyPatches(const NsoUtils::NsoHeader *header, u8 *mapped_nso, size_t mapped_size) {
+ /* Inspect all patches from /atmosphere/exefs_patches/<*>/<*>.ips */
char path[FS_MAX_PATH+1] = {0};
- snprintf(path, sizeof(path) - 1, "sdmc:/atmosphere/titles/%016lx/exefs_patches", title_id);
+ snprintf(path, sizeof(path) - 1, "sdmc:/atmosphere/exefs_patches");
DIR *patches_dir = opendir(path);
struct dirent *pdir_ent;
if (patches_dir != NULL) {
@@ -138,7 +138,7 @@ void PatchUtils::ApplyPatches(u64 title_id, const NsoUtils::NsoHeader *header, u
if (strcmp(pdir_ent->d_name, ".") == 0 || strcmp(pdir_ent->d_name, "..") == 0) {
continue;
}
- snprintf(path, sizeof(path) - 1, "sdmc:/atmosphere/titles/%016lx/exefs_patches/%s", title_id, pdir_ent->d_name);
+ snprintf(path, sizeof(path) - 1, "sdmc:/atmosphere/exefs_patches/%s", pdir_ent->d_name);
DIR *patch_dir = opendir(path);
struct dirent *ent;
if (patch_dir != NULL) {
@@ -149,7 +149,7 @@ void PatchUtils::ApplyPatches(u64 title_id, const NsoUtils::NsoHeader *header, u
}
size_t name_len = strlen(ent->d_name);
if ((4 < name_len && name_len <= 0x44) && ((name_len & 1) == 0) && strcmp(ent->d_name + name_len - 4, ".ips") == 0 && MatchesBuildId(ent->d_name, name_len, header->build_id)) {
- snprintf(path, sizeof(path) - 1, "sdmc:/atmosphere/titles/%016lx/exefs_patches/%s/%s", title_id, pdir_ent->d_name, ent->d_name);
+ snprintf(path, sizeof(path) - 1, "sdmc:/atmosphere/exefs_patches/%s/%s", pdir_ent->d_name, ent->d_name);
FILE *f_ips = fopen(path, "rb");
if (f_ips != NULL) {
u8 header[5];
diff --git a/stratosphere/loader/source/ldr_patcher.hpp b/stratosphere/loader/source/ldr_patcher.hpp
index cea953a73..07794a3a9 100644
--- a/stratosphere/loader/source/ldr_patcher.hpp
+++ b/stratosphere/loader/source/ldr_patcher.hpp
@@ -6,5 +6,5 @@
class PatchUtils {
public:
- static void ApplyPatches(u64 title_id, const NsoUtils::NsoHeader *header, u8 *mapped_nso, size_t size);
+ static void ApplyPatches(const NsoUtils::NsoHeader *header, u8 *mapped_nso, size_t size);
};
\ No newline at end of file