Fixes for building on Mac with OpenGL disabled.
This commit is contained in:
committed by
Sam Lantinga
parent
df7639f100
commit
4667d65f77
@@ -919,11 +919,16 @@ static void Cocoa_UpdateClipCursor(SDL_Window *window)
|
|||||||
- (void)windowDidChangeScreen:(NSNotification *)aNotification
|
- (void)windowDidChangeScreen:(NSNotification *)aNotification
|
||||||
{
|
{
|
||||||
/*printf("WINDOWDIDCHANGESCREEN\n");*/
|
/*printf("WINDOWDIDCHANGESCREEN\n");*/
|
||||||
|
|
||||||
|
#if SDL_VIDEO_OPENGL
|
||||||
|
|
||||||
if (_data && _data.nscontexts) {
|
if (_data && _data.nscontexts) {
|
||||||
for (SDLOpenGLContext *context in _data.nscontexts) {
|
for (SDLOpenGLContext *context in _data.nscontexts) {
|
||||||
[context movedToNewScreen];
|
[context movedToNewScreen];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* SDL_VIDEO_OPENGL */
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)windowWillEnterFullScreen:(NSNotification *)aNotification
|
- (void)windowWillEnterFullScreen:(NSNotification *)aNotification
|
||||||
@@ -2316,7 +2321,12 @@ void Cocoa_DestroyWindow(_THIS, SDL_Window *window)
|
|||||||
SDL_WindowData *data = (SDL_WindowData *)CFBridgingRelease(window->driverdata);
|
SDL_WindowData *data = (SDL_WindowData *)CFBridgingRelease(window->driverdata);
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
|
#if SDL_VIDEO_OPENGL
|
||||||
|
|
||||||
NSArray *contexts;
|
NSArray *contexts;
|
||||||
|
|
||||||
|
#endif /* SDL_VIDEO_OPENGL */
|
||||||
|
|
||||||
if ([data.listener isInFullscreenSpace]) {
|
if ([data.listener isInFullscreenSpace]) {
|
||||||
[NSMenu setMenuBarVisible:YES];
|
[NSMenu setMenuBarVisible:YES];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user