Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

Commit

Permalink
Removed SceScreenShotDisable hook
Browse files Browse the repository at this point in the history
  • Loading branch information
FMudanyali authored Jun 4, 2020
1 parent a38053d commit 9f91f37
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions app/trophy_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,11 @@ int sceShellUtilTextClipboardRead(void* data, SceSize size, SceSize *textlen);
int sceShellUtilTextClipboardWrite(const void* data, SceSize size);
int sceAppMgrIsGameProgram(int);

int hook[2];
int hook[1];
static tai_hook_ref_t screenshot_hook;
static tai_hook_ref_t screen_disable_hook;
const static int done_magic = DONE_MAGIC;
static int frames = 0;

void sceScreenShotDisable_patched() {
printf("INFO TrophyShot: Prevented disabling screenshot. \n");
}

int sceDisplaySetFrameBuf_patched(const SceDisplayFrameBuf* pParam, SceDisplaySetBufSync sync) {

Expand Down Expand Up @@ -63,12 +59,6 @@ int module_start(SceSize args, void *argp) {

if (ret == 1) {
sceSysmoduleLoadModule(SCE_SYSMODULE_SCREEN_SHOT);
hook[1] = taiHookFunctionExport(
&screen_disable_hook,
"SceScreenShot",
0xF26FC97D, //SceScreenShot
0x50AE9FF9, //SceScreenShotDisable
sceScreenShotDisable_patched);

hook[0] = taiHookFunctionImport(
&screenshot_hook,
Expand All @@ -77,14 +67,13 @@ int module_start(SceSize args, void *argp) {
0x7A410B64, //sceDisplaySetFrameBuf
sceDisplaySetFrameBuf_patched);

printf("hooks: 0x%x 0x%x\n", hook[0], hook[1]);
printf("INFO TrophyShot_app: sceDisplaySetFrameBuf HOOK: 0x%x\n", hook[0]);
}

return SCE_KERNEL_START_SUCCESS;
}

int module_stop(SceSize args, void *argp) {
if (hook[0] >= 0) taiHookRelease(hook[0], screenshot_hook);
if (hook[1] >= 0) taiHookRelease(hook[1], screen_disable_hook);
return SCE_KERNEL_STOP_SUCCESS;
}

0 comments on commit 9f91f37

Please sign in to comment.