diff --git a/Makefile b/Makefile index 83050837..6e46c167 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ export APP_AUTHOR = jtothebell export V_MAJOR = 0 export V_MINOR = 0 export V_PATCH = 2 -export V_BUILD = 10 +export V_BUILD = 11 export APP_VERSION = v$(V_MAJOR).$(V_MINOR).$(V_PATCH).$(V_BUILD) diff --git a/source/main.cpp b/source/main.cpp index 162badfa..1ac1420b 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -10,6 +10,10 @@ #include "host.h" #include "hostVmShared.h" +#if __VITA__ +#include +#endif + int main(int argc, char* argv[]) @@ -30,9 +34,26 @@ int main(int argc, char* argv[]) vm->SetCartList(host->listcarts()); + bool loadCart = false; + char* cart; + char boot_params[1024]; + + #if __VITA__ + sceAppMgrGetAppParam(boot_params); + if (strstr(boot_params,"psgm:play") && strstr(boot_params, "¶m=")) { + loadCart = true; + cart = strstr(boot_params, "¶m=") + 7; + } + #else + if (argc > 1) { + cart = argv[1]; + loadCart = true; + } + #endif + Logger_Write("Loading Bios cart\n"); - if (argc > 1){ - vm->LoadCart(argv[1]); + if (loadCart){ + vm->LoadCart(cart); } else { vm->LoadBiosCart();