summaryrefslogtreecommitdiff
path: root/macosx/main.m
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-06-22 19:55:35 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-06-22 19:55:35 +0000
commitb6b2beab4846d5579514aed399d7eab56d6d02f0 (patch)
tree86be926c6a96344e7911486ed02ba1749bcaae10 /macosx/main.m
parent33fb691cf7b6440102337966e34558f0a1851028 (diff)
downloadpcsxr-b6b2beab4846d5579514aed399d7eab56d6d02f0.tar.gz
Ignore files passed via the command line if we're parsing.
Calls to GUI functions should happen on the main thread. Put the [NSApp presentError:] in a block to the main thread. Put some bools in PcsxrController inside a struct with a size of 1. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85488 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/main.m')
-rwxr-xr-xmacosx/main.m17
1 files changed, 5 insertions, 12 deletions
diff --git a/macosx/main.m b/macosx/main.m
index 204d2c29..5dd3410c 100755
--- a/macosx/main.m
+++ b/macosx/main.m
@@ -21,15 +21,6 @@ static BOOL sysInited = NO;
//#define EMU_LOG
static IOPMAssertionID powerAssertion = kIOPMNullAssertionID;
-#define HELPSTR \
-"%s\n\n" \
-"\t--help shows this message\n" \
-"\t--iso path launch with selected ISO\n" \
-"\t--cdrom launch with a CD-ROM\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"
-
int main(int argc, const char *argv[]) {
if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 ) {
char parentdir[MAXPATHLEN];
@@ -125,14 +116,16 @@ void SysPrintf(const char *fmt, ...) {
void SysMessage(const char *fmt, ...) {
va_list list;
- NSString *locFmtString = NSLocalizedString([NSString stringWithCString:fmt encoding:NSUTF8StringEncoding], nil);
+ NSString *locFmtString = NSLocalizedString(@(fmt), nil);
va_start(list, fmt);
NSString *msg = [[NSString alloc] initWithFormat:locFmtString arguments:list];
va_end(list);
NSDictionary *userInfo = [NSDictionary dictionaryWithObject:msg forKey:NSLocalizedFailureReasonErrorKey];
- [NSApp presentError:[NSError errorWithDomain:@"Unknown Domain" code:-1 userInfo:userInfo]];
+ dispatch_sync(dispatch_get_main_queue(), ^{
+ [NSApp presentError:[NSError errorWithDomain:@"Unknown Domain" code:-1 userInfo:userInfo]];
+ });
RELEASEOBJ(msg);
}
@@ -199,7 +192,7 @@ void OnFile_Exit() {
char* Pcsxr_locale_text(char* toloc){
NSBundle *mainBundle = [NSBundle mainBundle];
NSString *origString = nil, *transString = nil;
- origString = [NSString stringWithCString:toloc encoding:NSUTF8StringEncoding];
+ origString = @(toloc);
transString = [mainBundle localizedStringForKey:origString value:nil table:nil];
return (char*)[transString UTF8String];
}