Skip to content

Commit ac327b9

Browse files
authored
Merge pull request #82 from jtothebell/VitaLauncher
Vita launcher
2 parents 9cb2d0a + 169d918 commit ac327b9

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export APP_AUTHOR = jtothebell
77
export V_MAJOR = 0
88
export V_MINOR = 0
99
export V_PATCH = 2
10-
export V_BUILD = 10
10+
export V_BUILD = 11
1111
export APP_VERSION = v$(V_MAJOR).$(V_MINOR).$(V_PATCH).$(V_BUILD)
1212

1313

source/main.cpp

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#include "host.h"
1111
#include "hostVmShared.h"
1212

13+
#if __VITA__
14+
#include <vitasdk.h>
15+
#endif
16+
1317

1418

1519
int main(int argc, char* argv[])
@@ -30,9 +34,26 @@ int main(int argc, char* argv[])
3034

3135
vm->SetCartList(host->listcarts());
3236

37+
bool loadCart = false;
38+
char* cart;
39+
char boot_params[1024];
40+
41+
#if __VITA__
42+
sceAppMgrGetAppParam(boot_params);
43+
if (strstr(boot_params,"psgm:play") && strstr(boot_params, "&param=")) {
44+
loadCart = true;
45+
cart = strstr(boot_params, "&param=") + 7;
46+
}
47+
#else
48+
if (argc > 1) {
49+
cart = argv[1];
50+
loadCart = true;
51+
}
52+
#endif
53+
3354
Logger_Write("Loading Bios cart\n");
34-
if (argc > 1){
35-
vm->LoadCart(argv[1]);
55+
if (loadCart){
56+
vm->LoadCart(cart);
3657
}
3758
else {
3859
vm->LoadBiosCart();

0 commit comments

Comments
 (0)