diff --git a/sysmodules/pm/source/info.c b/sysmodules/pm/source/info.c index a324580..ed43edf 100644 --- a/sysmodules/pm/source/info.c +++ b/sysmodules/pm/source/info.c @@ -11,6 +11,9 @@ Result registerProgram(u64 *programHandle, const FS_ProgramInfo *programInfo, co Result res = 0; if (IS_N3DS) { + if (pi.programId >> 48 == 0xFFFF) { + return LOADER_RegisterProgram(programHandle, &pi, &piu); + } pi.programId = (pi.programId & ~N3DS_TID_MASK) | N3DS_TID_BIT; piu.programId = (piu.programId & ~N3DS_TID_MASK) | N3DS_TID_BIT; res = LOADER_RegisterProgram(programHandle, &pi, &piu); diff --git a/sysmodules/pm/source/manager.c b/sysmodules/pm/source/manager.c index a3cff9a..8cd07cb 100644 --- a/sysmodules/pm/source/manager.c +++ b/sysmodules/pm/source/manager.c @@ -49,7 +49,7 @@ Result UnregisterProcess(u64 titleId) ProcessData *foundProcess = NULL; ProcessList_Lock(&g_manager.processList); - foundProcess = ProcessList_FindProcessByTitleId(&g_manager.processList, titleId); + foundProcess = ProcessList_FindProcessByTitleId(&g_manager.processList, titleId & ~N3DS_TID_MASK); if (foundProcess != NULL) { if (foundProcess == g_manager.runningApplicationData) { g_manager.runningApplicationData = NULL;