From 72f3f7bc88bc1cb0212da341360531db67c8d9e1 Mon Sep 17 00:00:00 2001 From: JoseAaronLopezGarcia Date: Fri, 14 Jul 2023 00:15:11 +0200 Subject: [PATCH] cleanup --- core/compat/vitapops/syspatch.c | 17 +++++++++++++---- core/popcorn/main.c | 1 - extras/menus/xMenu/main.cpp | 2 ++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/core/compat/vitapops/syspatch.c b/core/compat/vitapops/syspatch.c index fc1ad7629..4f66bc681 100644 --- a/core/compat/vitapops/syspatch.c +++ b/core/compat/vitapops/syspatch.c @@ -65,9 +65,11 @@ static int isSystemBooted(void) void patchVitaPopsDisplay(SceModule2* mod){ u32 display_func = sctrlHENFindFunction("sceDisplay_Service", "sceDisplay_driver", 0x3E17FE8D); if (display_func){ - // protect vita pops vram - sceKernelAllocPartitionMemory(6, "POPS VRAM CONFIG", PSP_SMEM_Addr, 0x1B0, (void *)0x09FE0000); - sceKernelAllocPartitionMemory(6, "POPS VRAM", PSP_SMEM_Addr, 0x3C0000, (void *)0x090C0000); + //if (sceKernelInitApitype() != 0x144){ + // protect vita pops vram + sceKernelAllocPartitionMemory(6, "POPS VRAM CONFIG", PSP_SMEM_Addr, 0x1B0, (void *)0x09FE0000); + sceKernelAllocPartitionMemory(6, "POPS VRAM", PSP_SMEM_Addr, 0x3C0000, (void *)0x090C0000); + //} memset((void *)0x49FE0000, 0, 0x1B0); memset((void *)0x490C0000, 0, 0x3C0000); // register default screen handler @@ -114,6 +116,7 @@ int sceKernelResumeThreadPatched(SceUID thid) { if (draw_thread >= 0){ do_draw = 0; sceKernelWaitThreadEnd(draw_thread, NULL); + sceKernelDeleteThread(draw_thread); draw_thread = -1; } } @@ -341,7 +344,6 @@ void ARKVitaPopsOnModuleStart(SceModule2 * mod){ if (strcmp(mod->modname, "scePops_Manager") == 0){ patchPopsMan(mod); - hookImportByNID(mod, "sceKermit_driver",0x36666181, kermitSendRequestLog); goto flush; } @@ -419,6 +421,13 @@ int StartModuleHandler(int modid, SceSize argsize, void * argp, int * modstatus, SceModule2* mod = (SceModule2*) sceKernelFindModuleByUID(modid); + /* + int fd = sceIoOpen("ms0:/vitapops.log", PSP_O_WRONLY|PSP_O_APPEND|PSP_O_CREAT, 0777); + sceIoWrite(fd, mod->modname, strlen(mod->modname)); + sceIoWrite(fd, "\n", 1); + sceIoClose(fd); + */ + if (DisplaySetFrameBuf){ static int screen_init = 0; if (!screen_init){ diff --git a/core/popcorn/main.c b/core/popcorn/main.c index ecd1bb06f..0e146b549 100644 --- a/core/popcorn/main.c +++ b/core/popcorn/main.c @@ -1139,7 +1139,6 @@ int module_start(SceSize args, void* argp) #ifdef DEBUG printk("pops disc id: %s\r\n", g_DiscID); #endif - g_pspFwVersion = sceKernelDevkitVersion(); getKeys(); diff --git a/extras/menus/xMenu/main.cpp b/extras/menus/xMenu/main.cpp index 81d461718..1c0b86eee 100644 --- a/extras/menus/xMenu/main.cpp +++ b/extras/menus/xMenu/main.cpp @@ -26,4 +26,6 @@ int main(int argc, char** argv){ disableGraphics(); sceKernelExitGame(); + + return 0; }