forked from THEN00P/EasyPlugin
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added no sleep thread, Blocked PS button while in installer, Blocked …
…USB Connection popup while in app
- Loading branch information
1 parent
db4d7ab
commit dab63e7
Showing
7 changed files
with
43 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include "nosleep_thread.h" | ||
|
||
#include <psp2/kernel/threadmgr.h> | ||
#include <psp2/kernel/processmgr.h> | ||
|
||
|
||
void StartNoSleepThread() { | ||
SceUID thid_sleep = sceKernelCreateThread("nosleep_thread", (SceKernelThreadEntry)nosleep_thread, 0x40, 0x1000, 0, 0, nullptr); | ||
sceKernelStartThread(thid_sleep, 0, nullptr); | ||
} | ||
|
||
int nosleep_thread(SceSize args, void *argp) { | ||
while (true) { | ||
sceKernelPowerTick(SCE_KERNEL_POWER_TICK_DISABLE_AUTO_SUSPEND); | ||
sceKernelDelayThread(10 * 1000 * 1000); | ||
} | ||
|
||
sceKernelExitDeleteThread(0); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
|
||
#include <psp2/types.h> | ||
|
||
|
||
void StartNoSleepThread(); | ||
int nosleep_thread(SceSize args, void *argp); |