From 95d8573be44b40a827f244d920b57d75ecff2a5c Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Mon, 3 Mar 2014 19:22:10 +0000 Subject: OS X: Check for an RTFD credits in the plug-ins. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@89252 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/plugins/DFInput/macsrc/PadController.m | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'macosx/plugins/DFInput/macsrc') diff --git a/macosx/plugins/DFInput/macsrc/PadController.m b/macosx/plugins/DFInput/macsrc/PadController.m index 93b3e54b..3ec7d14b 100755 --- a/macosx/plugins/DFInput/macsrc/PadController.m +++ b/macosx/plugins/DFInput/macsrc/PadController.m @@ -337,29 +337,31 @@ void DoAbout() { // Get parent application instance NSBundle *bundle = [NSBundle bundleWithIdentifier:APP_ID]; - + // Get Credits.rtf NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; NSAttributedString *credits; + if (!path) { + path = [bundle pathForResource:@"Credits" ofType:@"rtfd"]; + } if (path) { - credits = [[NSAttributedString alloc] initWithPath: path - documentAttributes:NULL]; + credits = [[NSAttributedString alloc] initWithPath:path documentAttributes:NULL]; } else { credits = [[NSAttributedString alloc] initWithString:@""]; } - + // Get Application Icon NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[bundle bundlePath]]; NSSize size = NSMakeSize(64, 64); [icon setSize:size]; - + NSDictionary *infoPaneDict = @{@"ApplicationName": [bundle objectForInfoDictionaryKey:@"CFBundleName"], - @"ApplicationIcon": icon, - @"ApplicationVersion": [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], - @"Version": [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], - @"Copyright": [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], - @"Credits": credits}; + @"ApplicationIcon": icon, + @"ApplicationVersion": [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], + @"Version": [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], + @"Copyright": [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], + @"Credits": credits}; dispatch_async(dispatch_get_main_queue(), ^{ [NSApp orderFrontStandardAboutPanelWithOptions:infoPaneDict]; }); -- cgit v1.2.3