diff --git a/Cocoa/Document.m b/Cocoa/Document.m index 1dbefaf9..24482c31 100644 --- a/Cocoa/Document.m +++ b/Cocoa/Document.m @@ -11,7 +11,8 @@ 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; diff --git a/Cocoa/Document.xib b/Cocoa/Document.xib index 754e92fa..472f71f7 100644 --- a/Cocoa/Document.xib +++ b/Cocoa/Document.xib @@ -18,6 +18,7 @@ + diff --git a/Cocoa/Preferences.xib b/Cocoa/Preferences.xib index af4b38e7..43b27b47 100644 --- a/Cocoa/Preferences.xib +++ b/Cocoa/Preferences.xib @@ -13,6 +13,7 @@ +