From 0112ea1c6bdb662dc032ebd93ff8f038c70a8704 Mon Sep 17 00:00:00 2001 From: "SND\\shalma_cp" Date: Mon, 20 Dec 2010 03:10:18 +0000 Subject: macosx - dfsound (null) - (MaddTheSane) configure screen - Patch #7815 git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@61342 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- .../plugins/DFSound/macsrc/PluginController-Null.m | 237 +++++++++++++++++++++ 1 file changed, 237 insertions(+) create mode 100644 macosx/plugins/DFSound/macsrc/PluginController-Null.m (limited to 'macosx/plugins/DFSound/macsrc/PluginController-Null.m') diff --git a/macosx/plugins/DFSound/macsrc/PluginController-Null.m b/macosx/plugins/DFSound/macsrc/PluginController-Null.m new file mode 100644 index 00000000..844d0736 --- /dev/null +++ b/macosx/plugins/DFSound/macsrc/PluginController-Null.m @@ -0,0 +1,237 @@ +#import "PluginController-Null.h" +#include "stdafx.h" +#include "externals.h" + +#define APP_ID @"com.codeplex.pcsxr.null.SPUPlugin" +#define PrefsKey APP_ID @" Settings" + +static PluginController *pluginController; +char * pConfigFile=NULL; + +void DoAbout() +{ + // Get parent application instance + NSApplication *app = [NSApplication sharedApplication]; + NSBundle *bundle = [NSBundle bundleWithIdentifier:APP_ID]; + + // Get Credits.rtf + NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; + NSAttributedString *credits; + if (path) { + credits = [[[NSAttributedString alloc] initWithPath: path + documentAttributes:NULL] autorelease]; + } else { + credits = [[[NSAttributedString alloc] initWithString:@""] autorelease]; + } + + // Get Application Icon + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[bundle bundlePath]]; + NSSize size = NSMakeSize(64, 64); + [icon setSize:size]; + + [app orderFrontStandardAboutPanelWithOptions:[NSDictionary dictionaryWithObjectsAndKeys: + [bundle objectForInfoDictionaryKey:@"CFBundleName"], @"ApplicationName", + icon, @"ApplicationIcon", + [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], @"ApplicationVersion", + [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], @"Version", + [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], @"Copyright", + credits, @"Credits", + nil]]; +} + + +long DoConfiguration() +{ + NSWindow *window; + + if (pluginController == nil) { + pluginController = [[PluginController alloc] initWithWindowNibName:@"NullSpuPluginMain"]; + } + window = [pluginController window]; + + /* load values */ + //[pluginController loadValues]; + + [window center]; + [window makeKeyAndOrderFront:nil]; + + return 0; +} + +void ReadConfig(void) +{ + iVolume = 1; + iUseTimer = 2; + iSPUIRQWait = 1; + iXAPitch = 0; + iUseReverb = 1; + iUseInterpolation = 0; + +} + +@implementation PluginController + +- (IBAction)ok:(id)sender +{ + [self close]; +} + +@end +#import "PluginController-Null.h" +#include "stdafx.h" +#include "externals.h" + +#define APP_ID @"com.codeplex.pcsxr.null.SPUPlugin" +#define PrefsKey APP_ID @" Settings" + +static PluginController *pluginController; +char * pConfigFile=NULL; + +void DoAbout() +{ + // Get parent application instance + NSApplication *app = [NSApplication sharedApplication]; + NSBundle *bundle = [NSBundle bundleWithIdentifier:APP_ID]; + + // Get Credits.rtf + NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; + NSAttributedString *credits; + if (path) { + credits = [[[NSAttributedString alloc] initWithPath: path + documentAttributes:NULL] autorelease]; + } else { + credits = [[[NSAttributedString alloc] initWithString:@""] autorelease]; + } + + // Get Application Icon + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[bundle bundlePath]]; + NSSize size = NSMakeSize(64, 64); + [icon setSize:size]; + + [app orderFrontStandardAboutPanelWithOptions:[NSDictionary dictionaryWithObjectsAndKeys: + [bundle objectForInfoDictionaryKey:@"CFBundleName"], @"ApplicationName", + icon, @"ApplicationIcon", + [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], @"ApplicationVersion", + [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], @"Version", + [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], @"Copyright", + credits, @"Credits", + nil]]; +} + + +long DoConfiguration() +{ + NSWindow *window; + + if (pluginController == nil) { + pluginController = [[PluginController alloc] initWithWindowNibName:@"NullSpuPluginMain"]; + } + window = [pluginController window]; + + /* load values */ + //[pluginController loadValues]; + + [window center]; + [window makeKeyAndOrderFront:nil]; + + return 0; +} + +void ReadConfig(void) +{ + iVolume = 1; + iUseTimer = 2; + iSPUIRQWait = 1; + iXAPitch = 0; + iUseReverb = 1; + iUseInterpolation = 0; + +} + +@implementation PluginController + +- (IBAction)ok:(id)sender +{ + [self close]; +} + +@end +#import "PluginController-Null.h" +#include "stdafx.h" +#include "externals.h" + +#define APP_ID @"com.codeplex.pcsxr.null.SPUPlugin" +#define PrefsKey APP_ID @" Settings" + +static PluginController *pluginController; +char * pConfigFile=NULL; + +void DoAbout() +{ + // Get parent application instance + NSApplication *app = [NSApplication sharedApplication]; + NSBundle *bundle = [NSBundle bundleWithIdentifier:APP_ID]; + + // Get Credits.rtf + NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; + NSAttributedString *credits; + if (path) { + credits = [[[NSAttributedString alloc] initWithPath: path + documentAttributes:NULL] autorelease]; + } else { + credits = [[[NSAttributedString alloc] initWithString:@""] autorelease]; + } + + // Get Application Icon + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[bundle bundlePath]]; + NSSize size = NSMakeSize(64, 64); + [icon setSize:size]; + + [app orderFrontStandardAboutPanelWithOptions:[NSDictionary dictionaryWithObjectsAndKeys: + [bundle objectForInfoDictionaryKey:@"CFBundleName"], @"ApplicationName", + icon, @"ApplicationIcon", + [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], @"ApplicationVersion", + [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], @"Version", + [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], @"Copyright", + credits, @"Credits", + nil]]; +} + + +long DoConfiguration() +{ + NSWindow *window; + + if (pluginController == nil) { + pluginController = [[PluginController alloc] initWithWindowNibName:@"NullSpuPluginMain"]; + } + window = [pluginController window]; + + /* load values */ + //[pluginController loadValues]; + + [window center]; + [window makeKeyAndOrderFront:nil]; + + return 0; +} + +void ReadConfig(void) +{ + iVolume = 1; + iUseTimer = 2; + iSPUIRQWait = 1; + iXAPitch = 0; + iUseReverb = 1; + iUseInterpolation = 0; + +} + +@implementation PluginController + +- (IBAction)ok:(id)sender +{ + [self close]; +} + +@end -- cgit v1.2.3