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
This commit is contained in:
SND\MaddTheSane_cp 2014-03-03 19:22:10 +00:00
parent 655115f51b
commit 95d8573be4
11 changed files with 144 additions and 117 deletions

View File

@ -8,7 +8,7 @@
@class ConfigurationController;
@class CheatController;
void ShowHelpAndExit(FILE* output, int exitCode);
__private_extern__ void ShowHelpAndExit(FILE* output, int exitCode);
extern BOOL wasFinderLaunch;
@interface PcsxrController : NSObject <NSApplicationDelegate>

View File

@ -227,7 +227,7 @@ const char *SysLibError()
#ifdef DEBUG
const char *theErr = dlerror();
if (theErr) {
NSLog(@"Error loading binary: %s.", theErr);
NSLog(@"dlerror(): %s.", theErr);
}
return theErr;
#else

View File

@ -37,29 +37,30 @@ void AboutDlgProc()
{
// 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]];
[icon setSize:NSMakeSize(64, 64)];
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];
});

View File

@ -40,30 +40,31 @@ void AboutDlgProc()
{
// 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];
});

View File

@ -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];
});

View File

@ -46,28 +46,30 @@ void AboutDlgProc()
{
// 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]];
[icon setSize:NSMakeSize(64, 64)];
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];
});

View File

@ -56,12 +56,15 @@ 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:@""];
}
@ -70,14 +73,14 @@ void DoAbout()
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];
});
@ -107,13 +110,14 @@ void ReadConfig(void)
{
NSDictionary *keyValues;
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults registerDefaults:@{PrefsKey: @{@"High Compatibility Mode": @YES,
@"SPU IRQ Wait": @YES,
@"XA Pitch": @NO,
@"Mono Sound Output": @NO,
@"Interpolation Quality": @0,
@"Reverb Quality": @1,
@"Volume": @3}}];
[defaults registerDefaults:
@{PrefsKey: @{@"High Compatibility Mode": @YES,
@"SPU IRQ Wait": @YES,
@"XA Pitch": @NO,
@"Mono Sound Output": @NO,
@"Interpolation Quality": @0,
@"Reverb Quality": @1,
@"Volume": @3}}];
keyValues = [defaults dictionaryForKey:PrefsKey];

View File

@ -48,13 +48,15 @@ void AboutDlgProc()
{
// 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:@""];
}
@ -63,14 +65,14 @@ void AboutDlgProc()
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];
});

View File

@ -8,47 +8,33 @@
#import <Cocoa/Cocoa.h>
@interface NetSfPeopsOpenGLPluginConfigController : NSWindowController
{
// buncha controls.
// most aren't worthy as IBOutlets since the IB interface
// uses bindings to magically set user defaults.
// But you can look at their grandness if you like:
IBOutlet NSCell *autoFullScreen;
IBOutlet NSPopUpButton *ditherMode;
IBOutlet NSCell *fpsCounter;
IBOutlet NSCell *frameSkipping;
IBOutlet NSCell *vSync;
IBOutlet NSControl *proportionalResize;
IBOutlet NSPopUpButton *fullscreenSize;
IBOutlet NSFormCell *windowWidth;
IBOutlet NSFormCell *windowHeighth;
IBOutlet NSPopUpButton *offscreenDrawing;
IBOutlet NSPopUpButton *texColorDepth;
IBOutlet NSSlider *texFiltering;
IBOutlet NSSlider *texEnhancment;
IBOutlet NSPopUpButton *frameBufferEffects;
IBOutlet NSCell *drawScanlines;
IBOutlet NSCell *advancedBlending;
IBOutlet NSCell *opaquePass;
IBOutlet NSCell *zMaskClipping;
IBOutlet NSCell *wireframeOnly;
IBOutlet NSCell *blurEffect;
IBOutlet NSCell *mjpegDecoder;
IBOutlet NSCell *mjpegDecoder15bit;
IBOutlet NSCell *gteAccuracy;
IBOutlet NSColorWell *scanlineColorWell;
IBOutlet NSMatrix *hacksMatrix;
IBOutlet NSControl *hackEnable;
IBOutlet NSWindow *hacksWindow;
NSMutableDictionary *keyValues;
}
@property (weak) IBOutlet NSCell *autoFullScreen;
@property (weak) IBOutlet NSPopUpButton *ditherMode;
@property (weak) IBOutlet NSCell *fpsCounter;
@property (weak) IBOutlet NSCell *frameSkipping;
@property (weak) IBOutlet NSCell *vSync;
@property (weak) IBOutlet NSControl *proportionalResize;
@property (weak) IBOutlet NSPopUpButton *fullscreenSize;
@property (weak) IBOutlet NSFormCell *windowWidth;
@property (weak) IBOutlet NSFormCell *windowHeighth;
@property (weak) IBOutlet NSPopUpButton *offscreenDrawing;
@property (weak) IBOutlet NSPopUpButton *texColorDepth;
@property (weak) IBOutlet NSSlider *texFiltering;
@property (weak) IBOutlet NSSlider *texEnhancment;
@property (weak) IBOutlet NSPopUpButton *frameBufferEffects;
@property (weak) IBOutlet NSCell *drawScanlines;
@property (weak) IBOutlet NSCell *advancedBlending;
@property (weak) IBOutlet NSCell *opaquePass;
@property (weak) IBOutlet NSCell *zMaskClipping;
@property (weak) IBOutlet NSCell *wireframeOnly;
@property (weak) IBOutlet NSCell *blurEffect;
@property (weak) IBOutlet NSCell *mjpegDecoder;
@property (weak) IBOutlet NSCell *mjpegDecoder15bit;
@property (weak) IBOutlet NSCell *gteAccuracy;
@property (weak) IBOutlet NSColorWell *scanlineColorWell;
@property (weak) IBOutlet NSMatrix *hacksMatrix;
@property (weak) IBOutlet NSControl *hackEnable;
@property (weak) IBOutlet NSWindow *hacksWindow;
@property (readwrite, retain) NSMutableDictionary *keyValues;
- (IBAction)cancel:(id)sender;
@ -65,4 +51,3 @@
@end
void PrepFactoryDefaultPreferences(void);

View File

@ -57,6 +57,9 @@ void AboutDlgProc()
// 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];
} else {
@ -70,11 +73,11 @@ void AboutDlgProc()
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];
});
@ -287,6 +290,33 @@ void ReadConfig(void)
}
@implementation NetSfPeopsOpenGLPluginConfigController
@synthesize autoFullScreen;
@synthesize ditherMode;
@synthesize fpsCounter;
@synthesize frameSkipping;
@synthesize vSync;
@synthesize proportionalResize;
@synthesize fullscreenSize;
@synthesize windowWidth;
@synthesize windowHeighth;
@synthesize offscreenDrawing;
@synthesize texColorDepth;
@synthesize texFiltering;
@synthesize texEnhancment;
@synthesize frameBufferEffects;
@synthesize drawScanlines;
@synthesize advancedBlending;
@synthesize opaquePass;
@synthesize zMaskClipping;
@synthesize wireframeOnly;
@synthesize blurEffect;
@synthesize mjpegDecoder;
@synthesize mjpegDecoder15bit;
@synthesize gteAccuracy;
@synthesize scanlineColorWell;
@synthesize hacksMatrix;
@synthesize hackEnable;
@synthesize hacksWindow;
@synthesize keyValues;
@ -299,7 +329,7 @@ void ReadConfig(void)
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:keyValues];
NSMutableDictionary *writeDic = [keyValues mutableCopy];
writeDic[kFPSCounter] = ([fpsCounter integerValue] ? @YES : @NO);
writeDic[@"Scanline Color"] = [NSArchiver archivedDataWithRootObject:[scanlineColorWell color]];
writeDic[kFrameSkipping] = ([frameSkipping integerValue] ? @YES : @NO);

View File

@ -40,7 +40,7 @@ extern PluginWindowController *gameController;
IBOutlet NSOpenGLView *glView;
// NSWindow *fullWindow;
bool inFullscreen;
BOOL inFullscreen;
}
+ (id)openGameView;