Skip to content

Commit

Permalink
Merge pull request #10 from KuromeSan/master
Browse files Browse the repository at this point in the history
Add Testkit/DEX support
  • Loading branch information
xyzz authored Apr 6, 2019
2 parents 4d32c21 + 993c6fc commit 113d471
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,25 @@ int module_start() {
// change extension from jpg to png
const char *path = "ur0:temp/screenshot/capture.png";
taiInjectData(info.modid, 0, 0x5148b8, path, strlen(path) + 1);
} else if (info.module_nid == 0x5549BF1F ||
} else if (info.module_nid == 0xEAB89D5C) //3.60 Testkit
{
// disable watermark
taiHookFunctionOffset(&watermark_hook, info.modid, 0, 0x240234, 1, place_watermark_hook);

// enable type=2 screenshot encoding
taiHookFunctionOffset(&encode_hook, info.modid, 0, 0x35c98e, 1, encode_screenshot);

// replace type=2 encoding with our png implementation
taiHookFunctionOffset(&encode_type2_hook, info.modid, 0, 0x36276a, 1, encode_type2);

// change branch for 0x34560004 (screenshot disable) to 0x34560003 (screenshot enable)
int value = 0x3b;
taiInjectData(info.modid, 0, 0x240C74, &value, 2);

// change extension from jpg to png
const char *path = "ur0:temp/screenshot/capture.png";
taiInjectData(info.modid, 0, 0x508B18, path, strlen(path) + 1);
}else if (info.module_nid == 0x5549BF1F ||
info.module_nid == 0x34B4D82E ||
info.module_nid == 0x12DAC0F3) { // 3.65/3.67/3.68 retail
// disable watermark
Expand Down

0 comments on commit 113d471

Please sign in to comment.