summaryrefslogtreecommitdiff
path: root/macosx/plugins/PeopsXgl/macsrc
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/PeopsXgl/macsrc
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/PeopsXgl/macsrc')
-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
6 files changed, 22 insertions, 25 deletions
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);