File: GBWindow.m

package info (click to toggle)
sameboy 1.0.2%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 10,632 kB
  • sloc: ansic: 29,954; objc: 22,249; asm: 1,424; pascal: 1,373; makefile: 1,064; xml: 111
file content (22 lines) | stat: -rw-r--r-- 618 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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 & NSEventModifierFlagDeviceIndependentFlagsMask) == NSEventModifierFlagOption)) {
        [self zoom:sender];
        return;
    }
    [super _zoomFill:sender];
}
@end