Skip to content

Commit

Permalink
Added a check on AutoPlugin 2 existence and refuse to boot if installed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinnegatamante committed Aug 24, 2022
1 parent 544db68 commit 314f4a7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions Source/CMakeLists.txt
Expand Up @@ -126,6 +126,7 @@ target_link_libraries(${PROJECT_NAME}.elf
SceAppMgr_stub
SceAppUtil_stub
SceShaccCg_stub
SceVshBridge_stub
c
stdc++
m
Expand Down
26 changes: 25 additions & 1 deletion Source/SysVita/main.cpp
Expand Up @@ -935,6 +935,31 @@ int callbacks_thread(unsigned int args, void* arg) {

int main(int argc, char* argv[]) {
char *rom;
int search_unk[2];

SceIoStat st0, st1, st2, st3, st4;
if (!sceIoGetstat("ux0:app/AUTOPLUG2", &st0) ||
!sceIoGetstat("ur0:app/AUTOPLUG2", &st1) ||
!sceIoGetstat("uma0:app/AUTOPLUG2", &st2) ||
!sceIoGetstat("imc0:app/AUTOPLUG2", &st3) ||
!sceIoGetstat("xmc0:app/AUTOPLUG2", &st4) ||
_vshKernelSearchModuleByName("hideautopl", search_unk) >= 0) {
vglInit(0);
SceMsgDialogUserMessageParam msg_param;
sceClibMemset(&msg_param, 0, sizeof(SceMsgDialogUserMessageParam));
msg_param.buttonType = SCE_MSG_DIALOG_BUTTON_TYPE_OK;
msg_param.msg = (const SceChar8*)"The author of this software (and the vast majority of the Vita dev scene) repudiates AutoPlugin due to the huge amount of problematics it causes. If you want to run this software, please uninstall AutoPlugin.";
SceMsgDialogParam param;
sceMsgDialogParamInit(&param);
param.mode = SCE_MSG_DIALOG_MODE_USER_MSG;
param.userMsgParam = &msg_param;
sceMsgDialogInit(&param);
while (sceMsgDialogGetStatus() != SCE_COMMON_DIALOG_STATUS_FINISHED) {
vglSwapBuffers(GL_TRUE);
}
sceKernelExitProcess(0);
}
printf("%X %X %X %X %X\n", st0, st1, st2, st3, st4);

// Initializing sceAppUtil
SceAppUtilInitParam appUtilParam;
Expand All @@ -953,7 +978,6 @@ int main(int argc, char* argv[]) {
preloadConfig();

// Checking for libshacccg.suprx existence
SceIoStat st1, st2;
if (!(sceIoGetstat("ur0:/data/libshacccg.suprx", &st1) >= 0 || sceIoGetstat("ur0:/data/external/libshacccg.suprx", &st2) >= 0)) {
vglInit(0);
SceMsgDialogUserMessageParam msg_param;
Expand Down

0 comments on commit 314f4a7

Please sign in to comment.