int main_thread(SceSize args, void *argp) { int mode = 1; if(g_args >= 4) mode = g_argp->mode; patch_sceLoadExec(mode); sctrlKernelExitVSH(NULL); return 0; }
static void reboot_vsh_with_error(u32 error) { struct SceKernelLoadExecVSHParam param; u32 vshmain_args[0x20/4]; memset(¶m, 0, sizeof(param)); memset(vshmain_args, 0, sizeof(vshmain_args)); vshmain_args[0/4] = 0x0400; vshmain_args[4/4] = 0x20; vshmain_args[0x14/4] = error; param.size = sizeof(param); param.args = 0x400; param.argp = vshmain_args; param.vshmain_args_size = 0x400; param.vshmain_args = vshmain_args; param.configfile = "/kd/pspbtcnf.txt"; sctrlKernelExitVSH(¶m); }
void recovery_exit(void) { save_recovery_font_select(); fontlist_clear(&g_font_list); proDebugScreenReleaseFont(); exit_usb(); if(no_vsh) { sctrlSESetConfig(&g_config); } else { vctrlVSHUpdateConfig(&g_config); resume_vsh_thread(); } clear_language(); vpl_finish(); if(no_vsh) { sctrlKernelExitVSH(NULL); } sceKernelStopUnloadSelfModule(0, NULL, NULL, NULL); }