summaryrefslogtreecommitdiff
path: root/macosx/plugins
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-11-10 20:22:50 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-11-10 20:22:50 +0000
commita96ba176322566d9d15b51c714984affcdfc6355 (patch)
treefe6496196975b981955a580d0a0442c235037749 /macosx/plugins
parent0f8e66e194b903763b6c580599eb47c11f154bdd (diff)
downloadpcsxr-a96ba176322566d9d15b51c714984affcdfc6355.tar.gz
OS X: make all ivars either be in the implementation block, or converted to Objective C 2.0 properties.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@92227 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins')
-rwxr-xr-xmacosx/plugins/Bladesio1/macsrc/PluginConfigController.h15
-rwxr-xr-xmacosx/plugins/Bladesio1/macsrc/PluginConfigController.m30
-rwxr-xr-xmacosx/plugins/DFCdrom/macsrc/PluginConfigController.h12
-rwxr-xr-xmacosx/plugins/DFCdrom/macsrc/PluginConfigController.m13
-rwxr-xr-xmacosx/plugins/DFInput/macsrc/PadView.h10
-rwxr-xr-xmacosx/plugins/DFInput/macsrc/PadView.m27
-rwxr-xr-xmacosx/plugins/DFNet/macsrc/PluginConfigController.h9
-rwxr-xr-xmacosx/plugins/DFNet/macsrc/PluginConfigController.m3
-rwxr-xr-xmacosx/plugins/DFSound/macsrc/NamedSlider.h4
-rwxr-xr-xmacosx/plugins/DFSound/macsrc/PluginController.m40
-rw-r--r--macosx/plugins/DFSound/macsrc/SPUPluginController.h21
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginConfigController.h40
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginConfigController.m44
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginGLView.h36
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginGLView.m34
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginWindowController.h8
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginWindowController.m16
-rwxr-xr-xmacosx/plugins/PeopsXgl/macsrc/PluginGLView.h8
-rwxr-xr-xmacosx/plugins/PeopsXgl/macsrc/PluginGLView.m7
-rwxr-xr-xmacosx/plugins/PeopsXgl/macsrc/PluginWindow.h4
-rwxr-xr-xmacosx/plugins/PeopsXgl/macsrc/PluginWindow.m4
-rwxr-xr-xmacosx/plugins/PeopsXgl/macsrc/PluginWindowController.h8
-rwxr-xr-xmacosx/plugins/PeopsXgl/macsrc/PluginWindowController.m16
23 files changed, 201 insertions, 208 deletions
diff --git a/macosx/plugins/Bladesio1/macsrc/PluginConfigController.h b/macosx/plugins/Bladesio1/macsrc/PluginConfigController.h
index 3adaf29b..71fee568 100755
--- a/macosx/plugins/Bladesio1/macsrc/PluginConfigController.h
+++ b/macosx/plugins/Bladesio1/macsrc/PluginConfigController.h
@@ -3,15 +3,14 @@
#import <Cocoa/Cocoa.h>
@interface Bladesio1PluginConfigController : NSWindowController
-{
- IBOutlet NSButton *enabledButton;
- IBOutlet NSTextField *ipAddressField;
- IBOutlet NSTextField *portField;
- IBOutlet NSPopUpButton *playerMenu;
- IBOutlet NSBox *configBox;
+@property (weak) IBOutlet NSButton *enabledButton;
+@property (weak) IBOutlet NSTextField *ipAddressField;
+@property (weak) IBOutlet NSTextField *portField;
+@property (weak) IBOutlet NSPopUpButton *playerMenu;
+@property (weak) IBOutlet NSBox *configBox;
+
+@property (strong) NSMutableDictionary *keyValues;
- NSMutableDictionary *keyValues;
-}
- (IBAction)cancel:(id)sender;
- (IBAction)ok:(id)sender;
- (IBAction)toggleEnabled:(id)sender;
diff --git a/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m b/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m
index 7057c8eb..c2b65b38 100755
--- a/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m
+++ b/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m
@@ -120,9 +120,9 @@ void ReadConfig()
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
- NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:keyValues];
+ NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:self.keyValues];
- NSString *theAddress = [ipAddressField stringValue];
+ NSString *theAddress = [self.ipAddressField stringValue];
NSInteger asciiLen = [theAddress lengthOfBytesUsingEncoding:NSASCIIStringEncoding];
if (asciiLen > (sizeof(settings.ip) - 1)) {
NSBeginAlertSheet(@"Address too long", nil, nil, nil, [self window], nil, NULL, NULL, NULL, @"The address is too long.\n\nTry to use only the IP address and not a host name.");
@@ -132,13 +132,13 @@ void ReadConfig()
return;
}
- writeDic[kSioEnabled] = (([enabledButton state] == NSOnState) ? @YES : @NO);
+ writeDic[kSioEnabled] = (([self.enabledButton state] == NSOnState) ? @YES : @NO);
writeDic[kSioIPAddress] = theAddress;
- writeDic[kSioPort] = @((u16)[portField intValue]);
+ writeDic[kSioPort] = @((u16)[self.portField intValue]);
{
int player;
- switch ([playerMenu indexOfSelectedItem]) {
+ switch ([self.playerMenu indexOfSelectedItem]) {
default:
case 0:
player = PLAYER_DISABLED;
@@ -166,9 +166,9 @@ void ReadConfig()
- (IBAction)toggleEnabled:(id)sender
{
- BOOL isEnabled = [enabledButton state] == NSOnState ? YES : NO;
+ BOOL isEnabled = [self.enabledButton state] == NSOnState ? YES : NO;
- for (NSView *subView in [[configBox subviews][0] subviews]) {
+ for (NSView *subView in [[self.configBox subviews][0] subviews]) {
if ([subView isKindOfClass:[NSTextField class]] && ![(NSTextField*)subView isEditable]) {
[(NSTextField*)subView setTextColor:isEnabled ? [NSColor controlTextColor] : [NSColor disabledControlTextColor]];
} else {
@@ -192,24 +192,24 @@ void ReadConfig()
ReadConfig();
// load from preferences
- keyValues = [[defaults dictionaryForKey:PrefsKey] mutableCopy];
+ self.keyValues = [[defaults dictionaryForKey:PrefsKey] mutableCopy];
- [enabledButton setState: [keyValues[kSioEnabled] boolValue] ? NSOnState : NSOffState];
- [ipAddressField setStringValue:keyValues[kSioIPAddress]];
- [portField setIntValue:[keyValues[kSioPort] intValue]];
+ [self.enabledButton setState: [self.keyValues[kSioEnabled] boolValue] ? NSOnState : NSOffState];
+ [self.ipAddressField setStringValue:self.keyValues[kSioIPAddress]];
+ [self.portField setIntValue:[self.keyValues[kSioPort] intValue]];
- switch ([keyValues[kSioPlayer] integerValue]) {
+ switch ([self.keyValues[kSioPlayer] integerValue]) {
default:
case PLAYER_DISABLED:
- [playerMenu selectItemAtIndex:0];
+ [self.playerMenu selectItemAtIndex:0];
break;
case PLAYER_MASTER:
- [playerMenu selectItemAtIndex:1];
+ [self.playerMenu selectItemAtIndex:1];
break;
case PLAYER_SLAVE:
- [playerMenu selectItemAtIndex:2];
+ [self.playerMenu selectItemAtIndex:2];
break;
}
diff --git a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.h b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.h
index 6e5913c4..ae471be0 100755
--- a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.h
+++ b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.h
@@ -3,14 +3,10 @@
#import <Cocoa/Cocoa.h>
@interface PluginConfigController : NSWindowController
-{
- IBOutlet NSControl *Cached;
- IBOutlet NSSlider *CacheSize;
- IBOutlet NSPopUpButton *CdSpeed;
-
- NSMutableDictionary *keyValues;
-}
-@property (retain) NSMutableDictionary *keyValues;
+@property (weak) IBOutlet NSControl *Cached;
+@property (weak) IBOutlet NSSlider *CacheSize;
+@property (weak) IBOutlet NSPopUpButton *CdSpeed;
+@property (strong) NSMutableDictionary *keyValues;
- (IBAction)cancel:(id)sender;
- (IBAction)ok:(id)sender;
diff --git a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m
index e0453c5a..9e727b14 100755
--- a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m
+++ b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m
@@ -104,6 +104,7 @@ void ReadConfig()
@implementation PluginConfigController
@synthesize keyValues;
+@synthesize CdSpeed;
- (IBAction)cancel:(id)sender
{
@@ -115,12 +116,12 @@ void ReadConfig()
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
- NSMutableDictionary *writeDic = [keyValues mutableCopy];
+ NSMutableDictionary *writeDic = [self.keyValues mutableCopy];
- writeDic[@"Threaded"] = ([Cached intValue] ? @YES : @NO);
- writeDic[@"Cache Size"] = @([CacheSize integerValue]);
+ writeDic[@"Threaded"] = ([self.Cached intValue] ? @YES : @NO);
+ writeDic[@"Cache Size"] = @([self.CacheSize integerValue]);
- switch ([CdSpeed indexOfSelectedItem]) {
+ switch ([self.CdSpeed indexOfSelectedItem]) {
case 1: writeDic[@"Speed"] = @1; break;
case 2: writeDic[@"Speed"] = @2; break;
case 3: writeDic[@"Speed"] = @4; break;
@@ -150,8 +151,8 @@ void ReadConfig()
// load from preferences
self.keyValues = [[NSMutableDictionary alloc] initWithDictionary:[defaults dictionaryForKey:PrefsKey]];
- [Cached setIntValue:[keyValues[@"Threaded"] intValue]];
- [CacheSize setIntegerValue:[keyValues[@"Cache Size"] integerValue]];
+ [self.Cached setIntValue:[keyValues[@"Threaded"] intValue]];
+ [self.CacheSize setIntegerValue:[keyValues[@"Cache Size"] integerValue]];
switch ([keyValues[@"Speed"] intValue]) {
case 1: [CdSpeed selectItemAtIndex:1]; break;
diff --git a/macosx/plugins/DFInput/macsrc/PadView.h b/macosx/plugins/DFInput/macsrc/PadView.h
index 8ab20ab5..5406a9f0 100755
--- a/macosx/plugins/DFInput/macsrc/PadView.h
+++ b/macosx/plugins/DFInput/macsrc/PadView.h
@@ -25,14 +25,12 @@
#import "ControllerList.h"
@interface PadView : NSView
-{
- IBOutlet NSTableView *tableView;
- IBOutlet NSPopUpButton *typeMenu;
- IBOutlet NSPopUpButton *deviceMenu;
- ControllerList *controller;
-}
+@property (weak) IBOutlet NSTableView *tableView;
+@property (weak) IBOutlet NSPopUpButton *typeMenu;
+@property (weak) IBOutlet NSPopUpButton *deviceMenu;
@property (weak) IBOutlet NSButton *useSDL2Check;
+@property (strong) ControllerList *controllerList;
- (IBAction)setType:(id)sender;
- (IBAction)setDevice:(id)sender;
diff --git a/macosx/plugins/DFInput/macsrc/PadView.m b/macosx/plugins/DFInput/macsrc/PadView.m
index befb5df3..21e76ded 100755
--- a/macosx/plugins/DFInput/macsrc/PadView.m
+++ b/macosx/plugins/DFInput/macsrc/PadView.m
@@ -23,6 +23,7 @@
#include "pad.h"
@implementation PadView
+@synthesize controllerList = controller;
- (id)initWithFrame:(NSRect)frameRect
{
@@ -43,7 +44,7 @@
g.cfg.PadDef[[ControllerList currentController]].Type =
([sender indexOfSelectedItem] > 0 ? PSE_PAD_TYPE_ANALOGPAD : PSE_PAD_TYPE_STANDARD);
- [tableView reloadData];
+ [self.tableView reloadData];
}
- (IBAction)setDevice:(id)sender
@@ -55,7 +56,7 @@
{
controller.usingSDL2 = !controller.usingSDL2;
- [tableView reloadData];
+ [self.tableView reloadData];
}
- (void)setController:(int)which
@@ -63,10 +64,10 @@
int i;
[ControllerList setCurrentController:which];
- [tableView setDataSource:controller];
+ [self.tableView setDataSource:controller];
- [deviceMenu removeAllItems];
- [deviceMenu addItemWithTitle:[[NSBundle bundleForClass:[self class]] localizedStringForKey:@"(Keyboard only)" value:@"" table:nil]];
+ [self.deviceMenu removeAllItems];
+ [self.deviceMenu addItemWithTitle:[[NSBundle bundleForClass:[self class]] localizedStringForKey:@"(Keyboard only)" value:@"" table:nil]];
for (i = 0; i < SDL_NumJoysticks(); i++) {
NSMenuItem *joystickItem;
@@ -82,19 +83,19 @@
joystickItem = [[NSMenuItem alloc] initWithTitle:@(SDL_JoystickName(i)) action:NULL keyEquivalent:@""];
#endif
[joystickItem setTag:i + 1];
- [[deviceMenu menu] addItem:joystickItem];
+ [[self.deviceMenu menu] addItem:joystickItem];
}
if (g.cfg.PadDef[which].DevNum >= SDL_NumJoysticks()) {
g.cfg.PadDef[which].DevNum = -1;
}
- [deviceMenu selectItemAtIndex:g.cfg.PadDef[which].DevNum + 1];
- [typeMenu selectItemAtIndex:(g.cfg.PadDef[which].Type == PSE_PAD_TYPE_ANALOGPAD ? 1 : 0)];
+ [self.deviceMenu selectItemAtIndex:g.cfg.PadDef[which].DevNum + 1];
+ [self.typeMenu selectItemAtIndex:(g.cfg.PadDef[which].Type == PSE_PAD_TYPE_ANALOGPAD ? 1 : 0)];
[self.useSDL2Check setState:g.cfg.PadDef[which].UseSDL2 ? NSOnState : NSOffState];
- [tableView reloadData];
+ [self.tableView reloadData];
}
- (BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)fieldEditor
@@ -107,15 +108,15 @@
{
unsigned short key = [theEvent keyCode];
- if ([[theEvent window] firstResponder] == tableView) {
+ if ([[theEvent window] firstResponder] == self.tableView) {
if (key == 51 || key == 117) {
// delete keys - remove the mappings for the selected item
- [controller deleteRow:[tableView selectedRow]];
- [tableView reloadData];
+ [controller deleteRow:[self.tableView selectedRow]];
+ [self.tableView reloadData];
return;
} else if (key == 36) {
// return key - configure the selected item
- [tableView editColumn:[tableView columnWithIdentifier:@"button"] row:[tableView selectedRow] withEvent:nil select:YES];
+ [self.tableView editColumn:[self.tableView columnWithIdentifier:@"button"] row:[self.tableView selectedRow] withEvent:nil select:YES];
return;
}
}
diff --git a/macosx/plugins/DFNet/macsrc/PluginConfigController.h b/macosx/plugins/DFNet/macsrc/PluginConfigController.h
index f0986e76..bb78b1a1 100755
--- a/macosx/plugins/DFNet/macsrc/PluginConfigController.h
+++ b/macosx/plugins/DFNet/macsrc/PluginConfigController.h
@@ -3,11 +3,10 @@
#import <Cocoa/Cocoa.h>
@interface PluginConfigController : NSWindowController
-{
- IBOutlet NSTextField *ipAddress;
- IBOutlet NSTextField *portNum;
- IBOutlet NSTextField *playerNum;
-}
+@property (weak) IBOutlet NSTextField *ipAddress;
+@property (weak) IBOutlet NSTextField *portNum;
+@property (weak) IBOutlet NSTextField *playerNum;
+
- (IBAction)cancel:(id)sender;
- (IBAction)ok:(id)sender;
diff --git a/macosx/plugins/DFNet/macsrc/PluginConfigController.m b/macosx/plugins/DFNet/macsrc/PluginConfigController.m
index 34b9ca6d..68229741 100755
--- a/macosx/plugins/DFNet/macsrc/PluginConfigController.m
+++ b/macosx/plugins/DFNet/macsrc/PluginConfigController.m
@@ -109,6 +109,9 @@ void ReadConfig()
}
@implementation PluginConfigController
+@synthesize ipAddress;
+@synthesize portNum;
+@synthesize playerNum;
- (IBAction)cancel:(id)sender
{
diff --git a/macosx/plugins/DFSound/macsrc/NamedSlider.h b/macosx/plugins/DFSound/macsrc/NamedSlider.h
index 6a5c869a..8b919224 100755
--- a/macosx/plugins/DFSound/macsrc/NamedSlider.h
+++ b/macosx/plugins/DFSound/macsrc/NamedSlider.h
@@ -3,10 +3,6 @@
#import <Cocoa/Cocoa.h>
@interface NamedSlider : NSSlider
-{
- NSArray *strings;
- __unsafe_unretained Class pluginClass;
-}
@property (strong) NSArray *strings;
@property (unsafe_unretained) Class pluginClass;
@end
diff --git a/macosx/plugins/DFSound/macsrc/PluginController.m b/macosx/plugins/DFSound/macsrc/PluginController.m
index 05104d48..f219bd3f 100755
--- a/macosx/plugins/DFSound/macsrc/PluginController.m
+++ b/macosx/plugins/DFSound/macsrc/PluginController.m
@@ -144,15 +144,15 @@ void ReadConfig(void)
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:self.keyValues];
- writeDic[@"High Compatibility Mode"] = ([hiCompBox intValue] ? @YES : @NO);
- writeDic[@"SPU IRQ Wait"] = ([irqWaitBox intValue] ? @YES : @NO);
- writeDic[@"Mono Sound Output"] = ([monoSoundBox intValue] ? @YES : @NO);
- writeDic[@"XA Pitch"] = ([xaSpeedBox intValue] ? @YES : @NO);
+ writeDic[@"High Compatibility Mode"] = ([self.hiCompBox intValue] ? @YES : @NO);
+ writeDic[@"SPU IRQ Wait"] = ([self.irqWaitBox intValue] ? @YES : @NO);
+ writeDic[@"Mono Sound Output"] = ([self.monoSoundBox intValue] ? @YES : @NO);
+ writeDic[@"XA Pitch"] = ([self.xaSpeedBox intValue] ? @YES : @NO);
- writeDic[@"Interpolation Quality"] = @([interpolValue intValue]);
- writeDic[@"Reverb Quality"] = @([reverbValue intValue]);
+ writeDic[@"Interpolation Quality"] = @([self.interpolValue intValue]);
+ writeDic[@"Reverb Quality"] = @([self.reverbValue intValue]);
- writeDic[@"Volume"] = @([volumeValue intValue]);
+ writeDic[@"Volume"] = @([self.volumeValue intValue]);
// write to defaults
[defaults setObject:writeDic forKey:PrefsKey];
@@ -180,14 +180,14 @@ void ReadConfig(void)
/* load from preferences */
self.keyValues = [NSMutableDictionary dictionaryWithDictionary:[defaults dictionaryForKey:PrefsKey]];
- [hiCompBox setIntValue:[keyValues[@"High Compatibility Mode"] boolValue]];
- [irqWaitBox setIntValue:[keyValues[@"SPU IRQ Wait"] boolValue]];
- [monoSoundBox setIntValue:[keyValues[@"Mono Sound Output"] boolValue]];
- [xaSpeedBox setIntValue:[keyValues[@"XA Pitch"] boolValue]];
+ [self.hiCompBox setIntValue:[self.keyValues[@"High Compatibility Mode"] boolValue]];
+ [self.irqWaitBox setIntValue:[self.keyValues[@"SPU IRQ Wait"] boolValue]];
+ [self.monoSoundBox setIntValue:[self.keyValues[@"Mono Sound Output"] boolValue]];
+ [self.xaSpeedBox setIntValue:[self.keyValues[@"XA Pitch"] boolValue]];
- [interpolValue setIntValue:[keyValues[@"Interpolation Quality"] intValue]];
- [reverbValue setIntValue:[keyValues[@"Reverb Quality"] intValue]];
- [volumeValue setIntValue:[keyValues[@"Volume"] intValue]];
+ [self.interpolValue setIntValue:[self.keyValues[@"Interpolation Quality"] intValue]];
+ [self.reverbValue setIntValue:[self.keyValues[@"Reverb Quality"] intValue]];
+ [self.volumeValue setIntValue:[self.keyValues[@"Volume"] intValue]];
}
- (void)awakeFromNib
@@ -196,26 +196,26 @@ void ReadConfig(void)
NSBundle *spuBundle = [NSBundle bundleForClass:thisClass];
- [interpolValue setStrings:@[
+ [self.interpolValue setStrings:@[
[spuBundle localizedStringForKey:@"(No Interpolation)" value:@"" table:nil],
[spuBundle localizedStringForKey:@"(Simple Interpolation)" value:@"" table:nil],
[spuBundle localizedStringForKey:@"(Gaussian Interpolation)" value:@"" table:nil],
[spuBundle localizedStringForKey:@"(Cubic Interpolation)" value:@"" table:nil]]];
- interpolValue.pluginClass = thisClass;
+ self.interpolValue.pluginClass = thisClass;
- [reverbValue setStrings:@[
+ [self.reverbValue setStrings:@[
[spuBundle localizedStringForKey:@"(No Reverb)" value:@"" table:nil],
[spuBundle localizedStringForKey:@"(Simple Reverb)" value:@"" table:nil],
[spuBundle localizedStringForKey:@"(PSX Reverb)" value:@"" table:nil]]];
- reverbValue.pluginClass = thisClass;
+ self.reverbValue.pluginClass = thisClass;
- [volumeValue setStrings:@[
+ [self.volumeValue setStrings:@[
[spuBundle localizedStringForKey:@"(Muted)" value:@"" table:nil],
[spuBundle localizedStringForKey:@"(Low)" value:@"" table:nil],
[spuBundle localizedStringForKey:@"(Medium)" value:@"" table:nil],
[spuBundle localizedStringForKey:@"(Loud)" value:@"" table:nil],
[spuBundle localizedStringForKey:@"(Loudest)" value:@"" table:nil]]];
- volumeValue.pluginClass = thisClass;
+ self.volumeValue.pluginClass = thisClass;
}
@end
diff --git a/macosx/plugins/DFSound/macsrc/SPUPluginController.h b/macosx/plugins/DFSound/macsrc/SPUPluginController.h
index d1e6924a..8fe29fe2 100644
--- a/macosx/plugins/DFSound/macsrc/SPUPluginController.h
+++ b/macosx/plugins/DFSound/macsrc/SPUPluginController.h
@@ -10,19 +10,16 @@
#import "NamedSlider.h"
@interface SPUPluginController : NSWindowController
-{
- IBOutlet NSCell *hiCompBox;
- IBOutlet NamedSlider *interpolValue;
- IBOutlet NSCell *irqWaitBox;
- IBOutlet NSCell *monoSoundBox;
- IBOutlet NamedSlider *reverbValue;
- IBOutlet NSCell *xaEnableBox;
- IBOutlet NSCell *xaSpeedBox;
- IBOutlet NamedSlider *volumeValue;
-
- NSMutableDictionary *keyValues;
-}
+@property (weak) IBOutlet NSCell *hiCompBox;
+@property (weak) IBOutlet NamedSlider *interpolValue;
+@property (weak) IBOutlet NSCell *irqWaitBox;
+@property (weak) IBOutlet NSCell *monoSoundBox;
+@property (weak) IBOutlet NamedSlider *reverbValue;
+@property (weak) IBOutlet NSCell *xaEnableBox;
+@property (weak) IBOutlet NSCell *xaSpeedBox;
+@property (weak) IBOutlet NamedSlider *volumeValue;
@property (readwrite, strong) NSMutableDictionary *keyValues;
+
- (IBAction)cancel:(id)sender;
- (IBAction)ok:(id)sender;
- (IBAction)reset:(id)sender;
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.h b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.h
index ea8e10ff..43d0b6df 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.h
+++ b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.h
@@ -5,33 +5,27 @@
#import <Cocoa/Cocoa.h>
@interface NetSfPeopsSoftGPUPluginConfigController : NSWindowController
-{
- IBOutlet NSControl *autoFullScreen;
- IBOutlet NSPopUpButton *ditherMode;
- IBOutlet NSControl *fpsCounter;
- IBOutlet NSControl *frameSkipping;
- IBOutlet NSControl *hackEnable;
- IBOutlet NSView *hacksView;
- IBOutlet NSMatrix *hacksMatrix;
- IBOutlet NSControl *vSync;
- IBOutlet NSControl *shaders;
- IBOutlet NSTextField *vertexShaderViewablePath;
- IBOutlet NSTextField *fragmentShaderViewablePath;
- IBOutlet NSControl *vertexChooser;
- IBOutlet NSControl *fragmentChooser;
- IBOutlet NSView *shadersView;
- IBOutlet NSPopUpButton *shaderQualitySelector;
-
- NSURL *vertexPath;
- NSURL *fragmentPath;
-
- NSMutableDictionary *keyValues;
-}
-
@property (strong) NSURL *vertexPath;
@property (strong) NSURL *fragmentPath;
+@property (strong) NSMutableDictionary *keyValues;
+
@property (weak) IBOutlet NSFormCell *displayWidth;
@property (weak) IBOutlet NSFormCell *displayHeight;
+@property (weak) IBOutlet NSControl *autoFullScreen;
+@property (weak) IBOutlet NSPopUpButton *ditherMode;
+@property (weak) IBOutlet NSControl *fpsCounter;
+@property (weak) IBOutlet NSControl *frameSkipping;
+@property (weak) IBOutlet NSControl *hackEnable;
+@property (weak) IBOutlet NSView *hacksView;
+@property (weak) IBOutlet NSMatrix *hacksMatrix;
+@property (weak) IBOutlet NSControl *vSync;
+@property (weak) IBOutlet NSControl *shaders;
+@property (weak) IBOutlet NSTextField *vertexShaderViewablePath;
+@property (weak) IBOutlet NSTextField *fragmentShaderViewablePath;
+@property (weak) IBOutlet NSControl *vertexChooser;
+@property (weak) IBOutlet NSControl *fragmentChooser;
+@property (weak) IBOutlet NSView *shadersView;
+@property (weak) IBOutlet NSPopUpButton *shaderQualitySelector;
- (IBAction)cancel:(id)sender;
- (IBAction)ok:(id)sender;
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m
index 7b79adfd..019a1301 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m
+++ b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m
@@ -205,9 +205,23 @@ void ReadConfig(void)
}
@implementation NetSfPeopsSoftGPUPluginConfigController
-
@synthesize fragmentPath;
@synthesize vertexPath;
+@synthesize autoFullScreen;
+@synthesize ditherMode;
+@synthesize fpsCounter;
+@synthesize frameSkipping;
+@synthesize hackEnable;
+@synthesize hacksView;
+@synthesize hacksMatrix;
+@synthesize vSync;
+@synthesize shaders;
+@synthesize vertexShaderViewablePath;
+@synthesize fragmentShaderViewablePath;
+@synthesize vertexChooser;
+@synthesize fragmentChooser;
+@synthesize shadersView;
+@synthesize shaderQualitySelector;
- (IBAction)cancel:(id)sender
{
@@ -218,7 +232,7 @@ void ReadConfig(void)
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
- NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:keyValues];
+ NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:self.keyValues];
writeDic[@"FPS Counter"] = ([fpsCounter intValue] ? @YES : @NO);
writeDic[@"Auto Full Screen"] = ([autoFullScreen intValue] ? @YES : @NO);
writeDic[@"Frame Skipping"] = ([frameSkipping intValue] ? @YES : @NO);
@@ -326,15 +340,15 @@ void ReadConfig(void)
ReadConfig();
/* load from preferences */
- keyValues = [[defaults dictionaryForKey:PrefsKey] mutableCopy];
+ self.keyValues = [[defaults dictionaryForKey:PrefsKey] mutableCopy];
{
BOOL resetPrefs = NO;
- [self setVertexPathInfo:[NSURL URLByResolvingBookmarkData:keyValues[@"VertexShader"] options:NSURLBookmarkResolutionWithoutUI relativeToURL:nil bookmarkDataIsStale:NULL error:nil]];
+ [self setVertexPathInfo:[NSURL URLByResolvingBookmarkData:self.keyValues[@"VertexShader"] options:NSURLBookmarkResolutionWithoutUI relativeToURL:nil bookmarkDataIsStale:NULL error:nil]];
if (!vertexPath) {
resetPrefs = YES;
}
- [self setFragmentPathInfo:[NSURL URLByResolvingBookmarkData:keyValues[@"FragmentShader"] options:NSURLBookmarkResolutionWithoutUI relativeToURL:nil bookmarkDataIsStale:NULL error:nil]];
+ [self setFragmentPathInfo:[NSURL URLByResolvingBookmarkData:self.keyValues[@"FragmentShader"] options:NSURLBookmarkResolutionWithoutUI relativeToURL:nil bookmarkDataIsStale:NULL error:nil]];
if (!fragmentPath) {
resetPrefs = YES;
}
@@ -344,22 +358,22 @@ void ReadConfig(void)
[self setFragmentPathInfo:[selfBundle URLForResource:@"gpuPeteOGL2" withExtension:@"slf"]];
}
}
- [fpsCounter setIntValue:[keyValues[@"FPS Counter"] intValue]];
- [autoFullScreen setIntValue:[keyValues[@"Auto Full Screen"] intValue]];
- [frameSkipping setIntValue:[keyValues[@"Frame Skipping"] intValue]];
- [vSync setIntValue:[keyValues[@"VSync"] intValue]];
- [hackEnable setIntValue:[keyValues[@"Enable Hacks"] intValue]];
- [shaders setIntValue:[keyValues[@"UseShader"] intValue]];
+ [fpsCounter setIntValue:[self.keyValues[@"FPS Counter"] intValue]];
+ [autoFullScreen setIntValue:[self.keyValues[@"Auto Full Screen"] intValue]];
+ [frameSkipping setIntValue:[self.keyValues[@"Frame Skipping"] intValue]];
+ [vSync setIntValue:[self.keyValues[@"VSync"] intValue]];
+ [hackEnable setIntValue:[self.keyValues[@"Enable Hacks"] intValue]];
+ [shaders setIntValue:[self.keyValues[@"UseShader"] intValue]];
- [ditherMode selectItemAtIndex:[keyValues[@"Dither Mode"] intValue]];
- [shaderQualitySelector selectItemAtIndex:[keyValues[@"ShaderQuality"] intValue] - 1];
+ [ditherMode selectItemAtIndex:[self.keyValues[@"Dither Mode"] intValue]];
+ [shaderQualitySelector selectItemAtIndex:[self.keyValues[@"ShaderQuality"] intValue] - 1];
- unsigned int hackValues = [keyValues[@"Hacks"] unsignedIntValue];
+ unsigned int hackValues = [self.keyValues[@"Hacks"] unsignedIntValue];
for (NSCell *control in [hacksMatrix cells]) {
[control setIntValue:(hackValues >> ([control tag] - 1)) & 1];
}
- theSize = NSSizeFromString(keyValues[kWindowSize]);
+ theSize = NSSizeFromString(self.keyValues[kWindowSize]);
[self.displayWidth setIntegerValue:theSize.width];
[self.displayHeight setIntegerValue:theSize.height];
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginGLView.h b/macosx/plugins/DFXVideo/macsrc/PluginGLView.h
index a8667b11..d75f7ee3 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginGLView.h
+++ b/macosx/plugins/DFXVideo/macsrc/PluginGLView.h
@@ -34,41 +34,7 @@ static inline void RunOnMainThreadSync(dispatch_block_t block)
}
@interface PluginGLView : NSOpenGLView
-{
- GLubyte *image_base;
- GLubyte *image[IMAGE_COUNT];
-
- GLboolean useShader;
- float shaderQuality;
- GLint buffers;
- GLuint vertexShader;
- GLuint fragmentShader;
- GLuint program;
- //GLint frame_rate;
-
- GLenum texture_hint;
- GLboolean rect_texture;
- GLboolean client_storage;
- GLboolean texture_range;
-
- struct timeval cycle_time;
-
- NSLock *glLock;
- BOOL noDisplay;
- BOOL drawBG;
-
- int image_width;
- int image_height;
- int image_width2;
- int image_height2;
- int image_depth;
- int image_type;
- float image_tx;
- float image_ty;
- int whichImage;
- BOOL isFullscreen;
- NSOpenGLPixelFormatAttribute oglProfile;
-}
+
@property (readonly, strong) NSLock *glLock;
- (void)renderScreen;
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m
index a3dda640..49dfe7b2 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m
+++ b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m
@@ -27,6 +27,40 @@
extern time_t tStart;
@implementation PluginGLView
+{
+ GLubyte *image_base;
+ GLubyte *image[IMAGE_COUNT];
+
+ GLboolean useShader;
+ float shaderQuality;
+ GLint buffers;
+ GLuint vertexShader;
+ GLuint fragmentShader;
+ GLuint program;
+ //GLint frame_rate;
+
+ GLenum texture_hint;
+ GLboolean rect_texture;
+ GLboolean client_storage;
+ GLboolean texture_range;
+
+ struct timeval cycle_time;
+
+ BOOL noDisplay;
+ BOOL drawBG;
+
+ int image_width;
+ int image_height;
+ int image_width2;
+ int image_height2;
+ int image_depth;
+ int image_type;
+ float image_tx;
+ float image_ty;
+ int whichImage;
+ BOOL isFullscreen;
+ NSOpenGLPixelFormatAttribute oglProfile;
+}
@synthesize glLock;
//- (id)initWithFrame:(NSRect)frameRect
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h
index 3d5d89e0..2ac5cc21 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h
+++ b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h
@@ -27,13 +27,9 @@ extern NSWindow *gameWindow;
extern PluginWindowController *gameController;
@interface PluginWindowController : NSWindowController <NSWindowDelegate>
-{
- IBOutlet NSOpenGLView *glView;
-
- NSWindow *fullWindow;
-}
-@property (getter = isFullscreen) BOOL fullscreen;
+@property (getter = isFullscreen) BOOL fullscreen;
+@property (weak) IBOutlet NSOpenGLView *glView;
+ (id)openGameView;
- (PluginGLView *)openGLView;
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m
index d6ddb17d..29b8b387 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m
+++ b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m
@@ -26,7 +26,9 @@ PluginWindowController *gameController;
NSRect windowFrame;
@implementation PluginWindowController
-
+{
+ NSWindow *fullWindow;
+}
+ (id)openGameView
{
if (gameWindow == nil) {
@@ -59,7 +61,7 @@ NSRect windowFrame;
- (PluginGLView *)openGLView
{
- return (PluginGLView *)glView;
+ return (PluginGLView *)self.glView;
}
- (void)dealloc
@@ -132,8 +134,8 @@ NSRect windowFrame;
screen:screen];
//[[glView openGLContext] setFullScreen];
- [[glView openGLContext] setView:[fullWindow contentView]];
- [glView reshape];
+ [[self.glView openGLContext] setView:[fullWindow contentView]];
+ [self.glView reshape];
//[[glView openGLContext] update];
//[fullWindow setContentView:glView];
@@ -156,8 +158,8 @@ NSRect windowFrame;
[fullWindow orderOut:self];
fullWindow = nil;
- [[glView openGLContext] setView:glView];
- [glView reshape];
+ [[self.glView openGLContext] setView:_glView];
+ [self.glView reshape];
//[window setContentView:glView];
}
@@ -178,7 +180,7 @@ NSRect windowFrame;
{
if (!(([sender resizeFlags] & NSShiftKeyMask) == NSShiftKeyMask)) {
NSRect oldSize = [sender frame];
- NSRect viewSize = [glView frame];
+ NSRect viewSize = [self.glView frame];
float xDiff = NSWidth(oldSize) - NSWidth(viewSize);
float yDiff = NSHeight(oldSize) - NSHeight(viewSize);
diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginGLView.h b/macosx/plugins/PeopsXgl/macsrc/PluginGLView.h
index a1d7bd03..14197890 100755
--- a/macosx/plugins/PeopsXgl/macsrc/PluginGLView.h
+++ b/macosx/plugins/PeopsXgl/macsrc/PluginGLView.h
@@ -34,14 +34,6 @@ static inline void RunOnMainThreadSync(dispatch_block_t block)
}
@interface PluginGLView : NSOpenGLView
-{
- struct timeval cycle_time;
-
- NSLock *glLock; // FIXME: wha?
- BOOL noDisplay;
- BOOL drawBG;
-
-}
- (void)swapBuffer; // I wonder what this does ;-)
- (void)clearBuffer:(BOOL)display;
diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m b/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m
index ec4eb915..e856556a 100755
--- a/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m
+++ b/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m
@@ -30,6 +30,13 @@
#undef BOOL
@implementation PluginGLView
+{
+ struct timeval cycle_time;
+
+ NSLock *glLock; // FIXME: wha?
+ BOOL noDisplay;
+ BOOL drawBG;
+}
- (BOOL)isOpaque
{
diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginWindow.h b/macosx/plugins/PeopsXgl/macsrc/PluginWindow.h
index ad4a2b18..4e60440e 100755
--- a/macosx/plugins/PeopsXgl/macsrc/PluginWindow.h
+++ b/macosx/plugins/PeopsXgl/macsrc/PluginWindow.h
@@ -20,10 +20,6 @@
#import <Cocoa/Cocoa.h>
@interface NetSfPeopsOpenGLGPUPluginWindow : NSWindow
-{
- NSWindow* myParent;
- NSPoint initialLocation;
-}
@property (readonly) BOOL canBecomeKeyWindow; // to stop the beeping
diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginWindow.m b/macosx/plugins/PeopsXgl/macsrc/PluginWindow.m
index 990495ec..9a45eb58 100755
--- a/macosx/plugins/PeopsXgl/macsrc/PluginWindow.m
+++ b/macosx/plugins/PeopsXgl/macsrc/PluginWindow.m
@@ -18,6 +18,10 @@
#import "PluginWindow.h"
@implementation NetSfPeopsOpenGLGPUPluginWindow
+{
+ NSWindow* myParent;
+ NSPoint initialLocation;
+}
/*
- (BOOL)windowShouldClose:(id)sender
{
diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.h b/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.h
index 2fd50d37..dff94ec7 100755
--- a/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.h
+++ b/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.h
@@ -36,12 +36,8 @@ extern NSWindow *gameWindow;
extern PluginWindowController *gameController;
@interface PluginWindowController : NSWindowController
-{
- IBOutlet NSOpenGLView *glView;
-
- // NSWindow *fullWindow;
- BOOL inFullscreen;
-}
+
+@property (weak) IBOutlet NSOpenGLView *glView;
+ (id)openGameView;
- (PluginGLView *)openGLView;
diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m b/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m
index 8ef05168..2963b171 100755
--- a/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m
+++ b/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m
@@ -61,7 +61,9 @@ NSRect FitRectInRect(NSRect source, NSRect destination)
}
@implementation PluginWindowController
-
+{
+ BOOL inFullscreen;
+}
+ (id)openGameView
{
// create a window for the GPU and return
@@ -168,7 +170,7 @@ NSRect FitRectInRect(NSRect source, NSRect destination)
- (PluginGLView *)openGLView
{
- return (PluginGLView *)glView;
+ return (PluginGLView *)self.glView;
}
- (void) cureAllIlls
@@ -184,7 +186,7 @@ NSRect FitRectInRect(NSRect source, NSRect destination)
rRatioRect.right = iResX;
rRatioRect.bottom = iResY;
- [[glView openGLContext] makeCurrentContext];
+ [[self.glView openGLContext] makeCurrentContext];
glFlush();
glFinish();
@@ -209,7 +211,7 @@ NSRect FitRectInRect(NSRect source, NSRect destination)
[NSOpenGLContext clearCurrentContext];
- [glView reshape]; // to get rid of fuglies on screen
+ [self.glView reshape]; // to get rid of fuglies on screen
// GLinitialize(); // blunt instrument method of setting a proper state.
}
@@ -313,7 +315,7 @@ NSRect FitRectInRect(NSRect source, NSRect destination)
if (!(([sender resizeFlags] & NSShiftKeyMask) == NSShiftKeyMask)) {
NSRect oldSize = [sender frame];
- NSRect viewSize = [glView frame];
+ NSRect viewSize = [self.glView frame];
float xDiff = NSWidth(oldSize) - NSWidth(viewSize);
float yDiff = NSHeight(oldSize) - NSHeight(viewSize);
@@ -404,8 +406,8 @@ NSRect FitRectInRect(NSRect source, NSRect destination)
roundf((aFrame.size.height - proportionalHeight)/2.0),
roundf(proportionalWidth), roundf(proportionalHeight));
- [glView setFrame:fitToWindow];
- [glView reshape];
+ [self.glView setFrame:fitToWindow];
+ [self.glView reshape];
iResX = roundf(proportionalWidth);
iResY = roundf(proportionalHeight);