notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6c9a982
)
frontend: allow loading states from specified file
author
notaz
<notasas@gmail.com>
Tue, 5 Apr 2011 20:15:10 +0000
(23:15 +0300)
committer
notaz
<notasas@gmail.com>
Tue, 5 Apr 2011 20:15:10 +0000
(23:15 +0300)
frontend/main.c
patch
|
blob
|
blame
|
history
diff --git
a/frontend/main.c
b/frontend/main.c
index
adf5e31
..
f97610a
100644
(file)
--- a/
frontend/main.c
+++ b/
frontend/main.c
@@
-225,6
+225,7
@@
int main(int argc, char *argv[])
char file[MAXPATHLEN] = "";
char path[MAXPATHLEN];
const char *cdfile = NULL;
char file[MAXPATHLEN] = "";
char path[MAXPATHLEN];
const char *cdfile = NULL;
+ const char *loadst_f = NULL;
int psxout = 0;
int loadst = 0;
int i;
int psxout = 0;
int loadst = 0;
int i;
@@
-255,6
+256,10
@@
int main(int argc, char *argv[])
cdfile = isofilename;
}
cdfile = isofilename;
}
+ else if (!strcmp(argv[i], "-loadf")) {
+ if (i+1 >= argc) break;
+ loadst_f = argv[++i];
+ }
else if (!strcmp(argv[i], "-h") ||
!strcmp(argv[i], "-help") ||
!strcmp(argv[i], "--help")) {
else if (!strcmp(argv[i], "-h") ||
!strcmp(argv[i], "-help") ||
!strcmp(argv[i], "--help")) {
@@
-340,6
+345,10
@@
int main(int argc, char *argv[])
int ret = emu_load_state(loadst - 1);
printf("%s state %d\n", ret ? "failed to load" : "loaded", loadst);
}
int ret = emu_load_state(loadst - 1);
printf("%s state %d\n", ret ? "failed to load" : "loaded", loadst);
}
+ if (loadst_f) {
+ int ret = LoadState(loadst_f);
+ printf("%s state file: %s\n", ret ? "failed to load" : "loaded", loadst_f);
+ }
}
else
menu_loop();
}
else
menu_loop();