mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
Enabled zoom window button on OS X
Independently from OS version the game will enter fullscreen mode when zoom button is clicked Window zooming behavior introduced in Yosemite is available on all supported versions of OS X
This commit is contained in:
parent
bb00c9b588
commit
7b0f557514
1 changed files with 22 additions and 0 deletions
|
@ -70,6 +70,27 @@
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@interface NSWindow(EnterFullscreenOnZoom)
|
||||||
|
- (void)enterFullscreenOnZoom;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation NSWindow(EnterFullscreenOnZoom)
|
||||||
|
|
||||||
|
- (void)enterFullscreen:(id)sender
|
||||||
|
{
|
||||||
|
ToggleFullscreen = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)enterFullscreenOnZoom
|
||||||
|
{
|
||||||
|
NSButton* zoomButton = [self standardWindowButton:NSWindowZoomButton];
|
||||||
|
[zoomButton setEnabled:YES];
|
||||||
|
[zoomButton setAction:@selector(enterFullscreen:)];
|
||||||
|
[zoomButton setTarget:self];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
EXTERN_CVAR(Bool, ticker )
|
EXTERN_CVAR(Bool, ticker )
|
||||||
EXTERN_CVAR(Bool, vid_vsync)
|
EXTERN_CVAR(Bool, vid_vsync)
|
||||||
|
@ -676,6 +697,7 @@ void CocoaVideo::SetWindowedMode(const int width, const int height)
|
||||||
|
|
||||||
[m_window setContentSize:windowSize];
|
[m_window setContentSize:windowSize];
|
||||||
[m_window center];
|
[m_window center];
|
||||||
|
[m_window enterFullscreenOnZoom];
|
||||||
[m_window exitAppOnClose];
|
[m_window exitAppOnClose];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue