summaryrefslogtreecommitdiff
path: root/macosx/plugins/DFSound/macsrc/PluginController-Null.m
blob: b4fc694de8ef33af90e483bfa987bd19dd41c77c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#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