aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author浅倉麗子2020-07-14 17:21:40 -0400
committer浅倉麗子2020-07-14 17:21:40 -0400
commitf641880bc5dca7a4e783d291dbe1d344d1465d59 (patch)
tree8b12418fa0d8b77791cb27fad76ab981abefd3a5
parentBuild with latest vita2d_sys (diff)
downloadsharpscale-f641880bc5dca7a4e783d291dbe1d344d1465d59.tar.gz
Always use original for reader and video appsoriginal-video-reader
-rw-r--r--CMakeLists.txt1
-rw-r--r--main.c10
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
)
diff --git a/main.c b/main.c
index a118963..7cd3093 100644
--- a/main.c
+++ b/main.c
@@ -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) {