diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-08-19 00:51:59 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-08-19 00:51:59 +0000 |
| commit | 1d8d16782e43a7697e72f6d8c5b298ca5de06c8c (patch) | |
| tree | 9367f19127fa293d434d1acb845a104e8293e178 | |
| parent | c4f5208806fe4136b19cce9f63f03820fc49d0cf (diff) | |
| download | pcsxr-1d8d16782e43a7697e72f6d8c5b298ca5de06c8c.tar.gz | |
win32: handle filename in commandline properly.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@56208 e17a0e51-4ae3-4d35-97c3-1a29b211df97
| -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;
|
