diff options
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | win32/gui/WndMain.c | 11 |
2 files changed, 11 insertions, 4 deletions
@@ -1,3 +1,7 @@ +August 19, 2010 Wei Mingzhi <whistler_wmz@users.sf.net>
+
+ * win32/gui/WndMain.c: Handle filename in commandline properly.
+
August 18, 2010 Wei Mingzhi <whistler_wmz@users.sf.net>
* plugins/peopsxgl/cfg.h: Readded Windows support.
diff --git a/win32/gui/WndMain.c b/win32/gui/WndMain.c index 9a3a1896..00fd2409 100644 --- a/win32/gui/WndMain.c +++ b/win32/gui/WndMain.c @@ -193,9 +193,12 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine } else if (strcmp(arg, "-runcd") == 0) {
cdfile[0] = '\0';
} else if (strcmp(arg, "-cdfile") == 0) {
- arg = strtok(NULL, " ");
+ arg = strtok(NULL, "\"");
if (arg != NULL) {
strcpy(cdfile, arg);
+ } else {
+ arg = strtok(NULL, " ");
+ if (arg != NULL) strcpy(cdfile, arg);
}
} else if (strcmp(arg, "-psxout") == 0) {
Config.PsxOut = TRUE;
@@ -203,11 +206,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine MessageBox(gApp.hWnd, _(
"Usage: pcsx [options]\n"
"\toptions:\n"
- "\t-runcd\t\tRuns CD-ROM\n"
- "\t-cdfile FILE\tRuns a CD image file\n"
+ "\t-runcd\t\tRuns CD-ROM (requires -nogui)\n"
+ "\t-cdfile FILE\tRuns a CD image file (requires -nogui)\n"
"\t-nogui\t\tDon't open the GUI\n"
"\t-psxout\t\tEnable PSX output\n"
- "\t-help\tDisplay this message"),
+ "\t-help\t\tDisplay this message"),
"PCSX", 0);
return 0;
|
