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
This commit is contained in:
parent
c2cb84c86e
commit
2696434b4e
|
@ -3492,6 +3492,7 @@
|
|||
SDKROOT = macosx;
|
||||
SKIP_INSTALL = YES;
|
||||
STRINGS_FILE_OUTPUT_ENCODING = binary;
|
||||
WARNING_CFLAGS = "-Wno-comment";
|
||||
};
|
||||
name = Instrument;
|
||||
};
|
||||
|
@ -3776,6 +3777,7 @@
|
|||
SKIP_INSTALL = YES;
|
||||
STRINGS_FILE_OUTPUT_ENCODING = binary;
|
||||
STRIP_INSTALLED_PRODUCT = NO;
|
||||
WARNING_CFLAGS = "-Wno-comment";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@ -3829,6 +3831,7 @@
|
|||
SDKROOT = macosx;
|
||||
SKIP_INSTALL = YES;
|
||||
STRINGS_FILE_OUTPUT_ENCODING = binary;
|
||||
WARNING_CFLAGS = "-Wno-comment";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
|
|
@ -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]];
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue