summaryrefslogtreecommitdiff
path: root/macosx/plugins/DFXVideo/macsrc
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/plugins/DFXVideo/macsrc')
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginWindowController.h2
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginWindowController.m21
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/drawgl.m2
3 files changed, 11 insertions, 14 deletions
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h
index f149eb55..3d5d89e0 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h
+++ b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h
@@ -32,7 +32,7 @@ extern PluginWindowController *gameController;
NSWindow *fullWindow;
}
-@property BOOL fullscreen;
+@property (getter = isFullscreen) BOOL fullscreen;
+ (id)openGameView;
- (PluginGLView *)openGLView;
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m
index f0b45280..d6ddb17d 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m
+++ b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m
@@ -35,8 +35,12 @@ NSRect windowFrame;
}
gameWindow = [gameController window];
}
+
windowFrame = NSMakeRect(0, 0, iResX + 8, iResY + 4);
+ windowFrame = [NSWindow contentRectForFrameRect:windowFrame styleMask:NSTitledWindowMask];
+
+
if (windowFrame.size.width != 0) {
[gameWindow setFrame:windowFrame display:NO];
}
@@ -63,6 +67,7 @@ NSRect windowFrame;
if (fullWindow) {
[fullWindow orderOut:self];
}
+ fullWindow = nil;
windowFrame = [[self window] frame];
}
@@ -75,14 +80,14 @@ NSRect windowFrame;
- (void)mouseDown:(NSEvent *)theEvent
{
- if ([self fullscreen]) {
+ if (self.fullscreen) {
[self setFullscreen:NO];
}
}
-- (BOOL)fullscreen
+- (BOOL)isFullscreen
{
- return (fullWindow!=nil);
+ return (fullWindow != nil);
}
- (void)setFullscreen:(BOOL)flag
@@ -164,7 +169,7 @@ NSRect windowFrame;
- (BOOL)windowShouldZoom:(NSWindow *)sender toFrame:(NSRect)newFrame
{
- [self setFullscreen:YES];
+ self.fullscreen = YES;
return NO;
}
@@ -197,14 +202,6 @@ NSRect windowFrame;
[[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowWantResume" object:self];
}
-//- (void)windowDidBecomeMain:(NSNotification *)aNotification
-/*- (void)windowDidBecomeKey:(NSNotification *)aNotification
-{
- if (iWindowMode==0) {
- [self setFullscreen:YES];
- }
-}*/
-
- (BOOL)windowShouldClose:(id)sender
{
if (fullWindow) {
diff --git a/macosx/plugins/DFXVideo/macsrc/drawgl.m b/macosx/plugins/DFXVideo/macsrc/drawgl.m
index 97cdf52d..99c4286a 100755
--- a/macosx/plugins/DFXVideo/macsrc/drawgl.m
+++ b/macosx/plugins/DFXVideo/macsrc/drawgl.m
@@ -203,7 +203,7 @@ void HandleKey(int keycode)
bSkipNextFrame = FALSE;
break;
case GPU_FULLSCREEN_KEY:
- [gameController setFullscreen:![gameController fullscreen]];
+ gameController.fullscreen = !gameController.fullscreen;
break;
}
}