mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-22 23:49:50 +00:00
(vita/launcher) Use snprintf
This commit is contained in:
parent
ef35adc9d6
commit
b037da7264
@ -3,25 +3,32 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
char core[256], rom[256];
|
||||
memset(core, 0, 256);
|
||||
memset(rom, 0, 256);
|
||||
FILE *f = fopen("app0:core.txt", "rb");
|
||||
FILE *f2 = fopen("app0:rom.txt", "rb");
|
||||
if (f && f2) {
|
||||
fread(core, 1, 256, f);
|
||||
fread(rom, 1, 256, f2);
|
||||
fclose(f);
|
||||
fclose(f2);
|
||||
char uri[512];
|
||||
sprintf(uri, "psgm:play?titleid=%s¶m=%s¶m2=%s", "RETROVITA", core, rom);
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
FILE *f, *f2;
|
||||
char core[256], rom[256];
|
||||
|
||||
sceAppMgrLaunchAppByUri(0xFFFFF, uri);
|
||||
sceKernelDelayThread(1000);
|
||||
}
|
||||
|
||||
sceKernelExitProcess(0);
|
||||
|
||||
return 0;
|
||||
memset(core, 0, 256);
|
||||
memset(rom, 0, 256);
|
||||
|
||||
f = fopen("app0:core.txt", "rb");
|
||||
f2 = fopen("app0:rom.txt", "rb");
|
||||
|
||||
if (f && f2)
|
||||
{
|
||||
char uri[512];
|
||||
fread(core, 1, 256, f);
|
||||
fread(rom, 1, 256, f2);
|
||||
fclose(f);
|
||||
fclose(f2);
|
||||
snprintf(uri, sizeof(uri),
|
||||
"psgm:play?titleid=%s¶m=%s¶m2=%s",
|
||||
"RETROVITA", core, rom);
|
||||
sceAppMgrLaunchAppByUri(0xFFFFF, uri);
|
||||
sceKernelDelayThread(1000);
|
||||
}
|
||||
|
||||
sceKernelExitProcess(0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user