mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-14 08:30:50 +00:00
Fixed exiting when window is closed by clicking close button
This happened on 10.6 and later when fullscreen mode was used before windowed
This commit is contained in:
parent
9e4a262c87
commit
4b5d7361cd
1 changed files with 6 additions and 12 deletions
|
@ -1163,6 +1163,8 @@ static bool s_fullscreenNewAPI;
|
||||||
|
|
||||||
// Hide window as nothing will be rendered at this point
|
// Hide window as nothing will be rendered at this point
|
||||||
[m_window orderOut:nil];
|
[m_window orderOut:nil];
|
||||||
|
|
||||||
|
I_ShutdownJoysticks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1187,10 +1189,6 @@ static bool s_fullscreenNewAPI;
|
||||||
[window makeFirstResponder:self];
|
[window makeFirstResponder:self];
|
||||||
[window setAcceptsMouseMovedEvents:YES];
|
[window setAcceptsMouseMovedEvents:YES];
|
||||||
|
|
||||||
NSButton* closeButton = [window standardWindowButton:NSWindowCloseButton];
|
|
||||||
[closeButton setAction:@selector(closeWindow:)];
|
|
||||||
[closeButton setTarget:self];
|
|
||||||
|
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1297,6 +1295,10 @@ static bool s_fullscreenNewAPI;
|
||||||
|
|
||||||
[m_window setContentSize:windowSize];
|
[m_window setContentSize:windowSize];
|
||||||
[m_window center];
|
[m_window center];
|
||||||
|
|
||||||
|
NSButton* closeButton = [m_window standardWindowButton:NSWindowCloseButton];
|
||||||
|
[closeButton setAction:@selector(terminate:)];
|
||||||
|
[closeButton setTarget:NSApp];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)changeVideoResolution:(bool)fullscreen width:(int)width height:(int)height useHiDPI:(bool)hiDPI
|
- (void)changeVideoResolution:(bool)fullscreen width:(int)width height:(int)height useHiDPI:(bool)hiDPI
|
||||||
|
@ -1496,14 +1498,6 @@ static bool s_fullscreenNewAPI;
|
||||||
m_window = tempWindow;
|
m_window = tempWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void)closeWindow:(id)sender
|
|
||||||
{
|
|
||||||
I_ShutdownJoysticks();
|
|
||||||
|
|
||||||
[NSApp terminate:sender];
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue