mirror of https://github.com/bsnes-emu/bsnes.git
Proper fullscreen support (Including Yosemite and older)
This commit is contained in:
parent
39f91f0dd6
commit
c9d4a4ebb5
|
@ -11,6 +11,7 @@
|
|||
reasonable alternative to this. */
|
||||
unsigned long pendingLogLines;
|
||||
bool tooMuchLogs;
|
||||
bool fullScreen;
|
||||
|
||||
NSString *lastConsoleInput;
|
||||
}
|
||||
|
@ -262,8 +263,21 @@ static uint32_t rgbEncode(GB_gameboy_t *gb, uint8_t r, uint8_t g, uint8_t b)
|
|||
}
|
||||
|
||||
|
||||
- (void) windowWillEnterFullScreen:(NSNotification *)notification
|
||||
{
|
||||
fullScreen = true;
|
||||
}
|
||||
|
||||
- (void) windowWillExitFullScreen:(NSNotification *)notification
|
||||
{
|
||||
fullScreen = false;
|
||||
}
|
||||
|
||||
- (NSRect)windowWillUseStandardFrame:(NSWindow *)window defaultFrame:(NSRect)newFrame
|
||||
{
|
||||
if (fullScreen) {
|
||||
return newFrame;
|
||||
}
|
||||
NSRect rect = window.contentView.frame;
|
||||
|
||||
int titlebarSize = window.contentView.superview.frame.size.height - rect.size.height;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="xOd-HO-29H" userLabel="Window">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowCollectionBehavior key="collectionBehavior" fullScreenPrimary="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="133" y="235" width="160" height="144"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<window title="Preferences" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="GBPreferencesWindow">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES"/>
|
||||
<windowCollectionBehavior key="collectionBehavior" fullScreenAuxiliary="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="196" y="240" width="292" height="292"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
|
||||
|
|
Loading…
Reference in New Issue