mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
Merge pull request #523 from alexey-lysiuk/osx_fullscreen
Final touches to fullscreen mode on OS X
This commit is contained in:
commit
c3cc98b5f3
2 changed files with 26 additions and 0 deletions
|
@ -70,6 +70,27 @@
|
|||
|
||||
@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, vid_vsync)
|
||||
|
@ -676,6 +697,7 @@ void CocoaVideo::SetWindowedMode(const int width, const int height)
|
|||
|
||||
[m_window setContentSize:windowSize];
|
||||
[m_window center];
|
||||
[m_window enterFullscreenOnZoom];
|
||||
[m_window exitAppOnClose];
|
||||
}
|
||||
|
||||
|
|
|
@ -884,6 +884,10 @@ OptionMenu "MiscOptions"
|
|||
Option "Merge left+right Alt/Ctrl/Shift", "k_mergekeys", "OnOff"
|
||||
Option "Alt-Enter toggles fullscreen", "k_allowfullscreentoggle", "OnOff"
|
||||
}
|
||||
IfOption(Mac)
|
||||
{
|
||||
Option "Command-F toggles fullscreen", "k_allowfullscreentoggle", "OnOff"
|
||||
}
|
||||
Option "Show IWAD selection dialog", "queryiwad", "OnOff"
|
||||
StaticText " "
|
||||
Option "Enable cheats from all games", "allcheats", "OnOff"
|
||||
|
|
Loading…
Reference in a new issue