summaryrefslogtreecommitdiff
path: root/macosx/Source
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-10-01 19:49:24 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-10-01 19:49:24 +0000
commit2696434b4e4890b0c77db963e17cc9282ec93134 (patch)
treea3a0961ea5759a7f0132df616c2b3c327e695a04 /macosx/Source
parentc2cb84c86ec9a3db773adca91ea5630a63e27320 (diff)
downloadpcsxr-2696434b4e4890b0c77db963e17cc9282ec93134.tar.gz
OS X: Match the command-line arguments with those of the Linux/UNIX version.
Quiet warnings about comments. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@91777 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/Source')
-rw-r--r--macosx/Source/PcsxrController.m56
-rw-r--r--macosx/Source/main.m2
2 files changed, 41 insertions, 17 deletions
diff --git a/macosx/Source/PcsxrController.m b/macosx/Source/PcsxrController.m
index e67830c1..7ab1df3d 100644
--- a/macosx/Source/PcsxrController.m
+++ b/macosx/Source/PcsxrController.m
@@ -25,20 +25,22 @@ NSString *saveStatePath = nil;
BOOL wasFinderLaunch = NO;
-#define HELPSTR "\n" \
+#define HELPSTR \
"At least one of these must be passed:\n" \
-"\t--iso path launch with selected ISO\n" \
-"\t--cdrom launch with a CD-ROM\n" \
-"\t--bios launch into the BIOS\n" \
+"\t-cdfile path launch with selected ISO\n" \
+"\t-runcd launch with a CD-ROM\n" \
+"\t-bios launch into the BIOS\n" \
"\n" \
"Additional options:\n" \
-"\t--exitAtClose closes PCSX-R at when the emulation has ended\n" \
-"\t--mcd1 path sets the fist memory card to path\n" \
-"\t--mcd2 path sets the second memory card to path\n" \
-"\t--freeze path loads freeze state from path\n" \
+"\t-nogui closes PCSX-R at when the emulation has ended\n" \
+"\t-mcd1 path sets the fist memory card to path\n" \
+"\t-mcd2 path sets the second memory card to path\n" \
+"\t-freeze path loads freeze state from path\n" \
+"\t-psxout Enable logging\n" \
+"\t-slowboot Show PSX splash screen\n" \
"\n" \
"Help:\n" \
-"\t--help shows this message\n" \
+"\t-help shows this message\n" \
"\n" \
@@ -443,14 +445,16 @@ runtimeStr = arg; \
otherblock();\
}
-#define kPCSXRArgumentCDROM @"--cdrom"
-#define kPCSXRArgumentBIOS @"--bios"
-#define kPCSXRArgumentISO @"--iso"
-#define kPCSXRArgumentMcd @"--mcd"
+#define kPCSXRArgumentCDROM @"-runcd"
+#define kPCSXRArgumentBIOS @"-bios"
+#define kPCSXRArgumentISO @"-cdfile"
+#define kPCSXRArgumentMcd @"-mcd"
#define kPCSXRArgumentMcd1 kPCSXRArgumentMcd @"1"
#define kPCSXRArgumentMcd2 kPCSXRArgumentMcd @"2"
-#define kPCSXRArgumentFreeze @"--freeze"
-#define kPCSXRArgumentExitAtClose @"--exitAtClose"
+#define kPCSXRArgumentFreeze @"-freeze"
+#define kPCSXRArgumentExitAtClose @"-nogui"
+#define kPCSXRArgumentLogOutput @"-psxout"
+#define kPCSXRArgumentSlowBoot @"-slowboot"
- (void)dealloc
{
@@ -518,7 +522,7 @@ otherblock();\
[larg addToDictionary:argDict];
};
- //This block/argument does not need to be sorted
+ // This block/argument does not need to be sorted
dispatch_block_t emuCloseAtEnd = ^{
hasParsedAnArgument = YES;
LaunchArg *larg = [[LaunchArg alloc] initWithLaunchOrder:LaunchArgPreRun argument:kPCSXRArgumentExitAtClose block:^{
@@ -527,6 +531,24 @@ otherblock();\
[larg addToDictionary:argDict];
};
+ // This block/argument does not need to be sorted
+ dispatch_block_t psxOut = ^{
+ hasParsedAnArgument = YES;
+ LaunchArg *larg = [[LaunchArg alloc] initWithLaunchOrder:LaunchArgPreRun argument:kPCSXRArgumentLogOutput block:^{
+ Config.PsxOut = true;
+ }];
+ [larg addToDictionary:argDict];
+ };
+
+ // This block/argument does not need to be sorted
+ dispatch_block_t slowBoot = ^{
+ hasParsedAnArgument = YES;
+ LaunchArg *larg = [[LaunchArg alloc] initWithLaunchOrder:LaunchArgPreRun argument:kPCSXRArgumentSlowBoot block:^{
+ Config.SlowBoot = true;
+ }];
+ [larg addToDictionary:argDict];
+ };
+
dispatch_block_t isoBlock = ^{
hasParsedAnArgument = YES;
NSString *path = FileTestBlock();
@@ -594,6 +616,8 @@ otherblock();\
HandleArgElse(kPCSXRArgumentMcd1, NO, ^{mcdBlock(1);})
HandleArgElse(kPCSXRArgumentMcd2, NO, ^{mcdBlock(2);})
HandleArgElse(kPCSXRArgumentFreeze, NO, freezeBlock)
+ HandleArgElse(kPCSXRArgumentLogOutput, NO, psxOut)
+ HandleArgElse(kPCSXRArgumentSlowBoot, NO, slowBoot)
else {
[unknownOptions addObject:progArgs[i]];
}
diff --git a/macosx/Source/main.m b/macosx/Source/main.m
index 33f74908..7a88b336 100644
--- a/macosx/Source/main.m
+++ b/macosx/Source/main.m
@@ -86,7 +86,7 @@ int main(int argc, const char *argv[])
} else {
for (int i = 1; i < argc; i++) {
//All the other option will be handled in the app delegate's awakeFromNib
- if (!strcasecmp("--help", argv[i])) {
+ if (!strcasecmp("--help", argv[i]) || !strcasecmp("-help", argv[i]) || !strcasecmp("-h", argv[i])) {
fprintf(stdout, "%s\n", argv[0]);
ShowHelpAndExit(stdout, EXIT_SUCCESS);
}