summaryrefslogtreecommitdiff
path: root/win32/gui
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-08-19 00:51:59 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-08-19 00:51:59 +0000
commit1d8d16782e43a7697e72f6d8c5b298ca5de06c8c (patch)
tree9367f19127fa293d434d1acb845a104e8293e178 /win32/gui
parentc4f5208806fe4136b19cce9f63f03820fc49d0cf (diff)
downloadpcsxr-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
Diffstat (limited to 'win32/gui')
-rw-r--r--win32/gui/WndMain.c11
1 files changed, 7 insertions, 4 deletions
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;