summaryrefslogtreecommitdiff
path: root/macosx/main.m
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-07-05 21:59:24 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-07-05 21:59:24 +0000
commitd50bdc6fb2378fc3219e14c47a7b1adc60ee2203 (patch)
tree924bce4490768605b7c0041db20a40e074a597b1 /macosx/main.m
parent3296522bfedc2c72cb7d3f4476a64db8bbf38e8f (diff)
downloadpcsxr-d50bdc6fb2378fc3219e14c47a7b1adc60ee2203.tar.gz
Change some +stringWithCString and -initWithCString:encoding: to modern Objective-C syntax.
Change the encoding of a couple of info.plists to UTF-8, otherwise Xcode was complaining. Removing some extra line breaks on OS X code. Other minor changes. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85867 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/main.m')
-rwxr-xr-xmacosx/main.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/macosx/main.m b/macosx/main.m
index 2b73320e..595475dd 100755
--- a/macosx/main.m
+++ b/macosx/main.m
@@ -123,16 +123,16 @@ void SysMessage(const char *fmt, ...) {
va_end(list);
NSDictionary *userInfo = [NSDictionary dictionaryWithObject:msg forKey:NSLocalizedFailureReasonErrorKey];
+ RELEASEOBJ(msg);
dispatch_sync(dispatch_get_main_queue(), ^{
[NSApp presentError:[NSError errorWithDomain:@"Unknown Domain" code:-1 userInfo:userInfo]];
});
-
- RELEASEOBJ(msg);
}
void *SysLoadLibrary(const char *lib) {
- NSBundle *bundle = [NSBundle bundleWithPath:[[NSFileManager defaultManager] stringWithFileSystemRepresentation:lib length:strlen(lib)]];
+ NSBundle *bundle = [[NSBundle alloc] initWithPath:[[NSFileManager defaultManager] stringWithFileSystemRepresentation:lib length:strlen(lib)]];
if (bundle != nil) {
+ AUTORELEASEOBJNORETURN(bundle);
return dlopen([[bundle executablePath] fileSystemRepresentation], RTLD_LAZY /*RTLD_NOW*/);
}
return dlopen(lib, RTLD_LAZY);