move patches to pm
This commit is contained in:
@@ -84,8 +84,6 @@ void postprocessSvc(void)
|
||||
officialPostProcessSvc();
|
||||
}
|
||||
|
||||
static bool doingVeryShittyPmResLimitWorkaround = false; // I feel dirty
|
||||
|
||||
void *svcHook(u8 *pageEnd)
|
||||
{
|
||||
KProcess *currentProcess = currentCoreContext->objectContext.currentProcess;
|
||||
@@ -97,13 +95,6 @@ void *svcHook(u8 *pageEnd)
|
||||
{
|
||||
case 0x01:
|
||||
return ControlMemoryHookWrapper;
|
||||
case 0x17:
|
||||
if(strcmp(codeSetOfProcess(currentProcess)->processName, "pm") == 0) // only called twice in pm, by the same function
|
||||
{
|
||||
*(vu32 *)(configPage + 0x44) += __end__ - __start__;
|
||||
doingVeryShittyPmResLimitWorkaround = true;
|
||||
}
|
||||
return officialSVCs[0x17];
|
||||
case 0x29:
|
||||
return GetHandleInfoHookWrapper;
|
||||
case 0x2A:
|
||||
@@ -124,13 +115,6 @@ void *svcHook(u8 *pageEnd)
|
||||
return SetGpuProt;
|
||||
case 0x5A:
|
||||
return SetWifiEnabled;
|
||||
case 0x79:
|
||||
if(doingVeryShittyPmResLimitWorkaround)
|
||||
{
|
||||
*(vu32 *)(configPage + 0x44) -= __end__ - __start__;
|
||||
doingVeryShittyPmResLimitWorkaround = false;
|
||||
}
|
||||
return officialSVCs[0x79];
|
||||
case 0x7B:
|
||||
return Backdoor;
|
||||
case 0x7C:
|
||||
|
||||
Reference in New Issue
Block a user