diff options
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | main.c | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5afb681..a8a0009 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,6 +61,7 @@ target_link_libraries("${ELF}" SceSblACMgrForDriver_stub SceSysclibForDriver_stub SceSysmemForDriver_stub + SceSysrootForKernel_stub taihenForKernel_stub taihenModuleUtils_stub ) @@ -37,6 +37,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. #define MIN(x, y) ((x) < (y) ? (x) : (y)) +#define STREQ(s1, s2) (strncmp(s1, s2, sizeof(s1)) == 0) + __attribute__ ((__format__ (__printf__, 1, 2))) static void LOG(const char *fmt, ...) { (void)fmt; @@ -204,8 +206,14 @@ static int sceIftuSetInputFrameBuffer_hook(int plane, SceIftuPlaneState *state, } float scale = 0.0; + char tid[0x20]; + + memset(tid, 0x00, sizeof(tid)); + ksceKernelGetProcessTitleId(SCE_KERNEL_PROCESS_ID_SELF, tid, sizeof(tid)); - if (ss_config.mode == SHARPSCALE_MODE_INTEGER) { + if (STREQ(tid, "PCSC80012") || STREQ(tid, "NPXS10010")) { + // SHARPSCALE_MODE_ORIGINAL + } else if (ss_config.mode == SHARPSCALE_MODE_INTEGER) { scale = fminf(4.0, (float)MIN(head_w / fb_w, head_h / (fb_h - 16))); scale = floorf(fminf(scale, 4.0 / ar_scale)); } else if (ss_config.mode == SHARPSCALE_MODE_REAL) { |