mirror of https://github.com/LIJI32/SameBoy.git
Restore Alt+Zoom behavior
This commit is contained in:
parent
f0a672c39e
commit
42732b20eb
|
@ -56,7 +56,7 @@
|
|||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" tabbingMode="disallowed" id="xOd-HO-29H" userLabel="Window">
|
||||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" tabbingMode="disallowed" id="xOd-HO-29H" userLabel="Window" customClass="GBWindow">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowCollectionBehavior key="collectionBehavior" fullScreenPrimary="YES"/>
|
||||
<rect key="contentRect" x="0.0" y="0.0" width="160" height="144"/>
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface GBWindow : NSWindow
|
||||
|
||||
@end
|
|
@ -0,0 +1,22 @@
|
|||
#import "GBWindow.h"
|
||||
|
||||
@interface NSWindow(private)
|
||||
- (void)_zoomFill:(id)sender;
|
||||
@end
|
||||
|
||||
/*
|
||||
For some reason, Apple replaced the alt + zoom button behavior to be "fill" rather than zoom.
|
||||
I don't like that. It prevents SameBoy's integer scaling from working. Let's restore it.
|
||||
*/
|
||||
|
||||
@implementation GBWindow
|
||||
- (void)_zoomFill:(id)sender
|
||||
{
|
||||
if (sender == [self standardWindowButton:NSWindowZoomButton] &&
|
||||
(self.currentEvent.modifierFlags & NSEventModifierFlagOption)) {
|
||||
[self zoom:sender];
|
||||
return;
|
||||
}
|
||||
[super _zoomFill:sender];
|
||||
}
|
||||
@end
|
Loading…
Reference in New Issue