git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

Cocoa/GBWindow.m

      1 #import "GBWindow.h"
      2 
      3 @interface NSWindow(private)
      4 - (void)_zoomFill:(id)sender;
      5 @end
      6 
      7 /*
      8    For some reason, Apple replaced the alt + zoom button behavior to be "fill" rather than zoom.
      9    I don't like that. It prevents SameBoy's integer scaling from working. Let's restore it.
     10 */
     11 
     12 @implementation GBWindow
     13 - (void)_zoomFill:(id)sender
     14 {
     15     if (sender == [self standardWindowButton:NSWindowZoomButton] &&
     16         ((self.currentEvent.modifierFlags & NSEventModifierFlagDeviceIndependentFlagsMask) == NSEventModifierFlagOption)) {
     17         [self zoom:sender];
     18         return;
     19     }
     20     [super _zoomFill:sender];
     21 }
     22 @end

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.