| Summary: | Fullscreen disables yellow minimize buttons on other Mac apps | ||
|---|---|---|---|
| Product: | SDL | Reporter: | My Game Company <info> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | info |
| Version: | 1.2.11 | ||
| Hardware: | PowerPC | ||
| OS: | Mac OS X 10.4 (Intel) | ||
| URL: | http://www.dirkdashing.com | ||
I found a workaround. I added this code after my call to SDL_SetVideoMode:
#ifdef __APPLE__
if (fullscreen == true)
{
SetSystemUIMode(kUIModeContentSuppressed, 0);
}
#endif
It would be nice if this would be incorporated into the SDL_SetVideoMode function, or perhaps the Cocoa equivalent (since the SDL XCode project uses Cocoa).
*** This bug has been marked as a duplicate of bug 281 *** I've attempted to the use the workaround given here, but it caused the system cursor to unhide when clicking on very top of the screen, where the menu bar would be. So I've applied the patch given for bug 281 to the 1.2.11 sources, and that seems to work fine. |
Running Mac OS 10.4.8 on Intel-based MacBook. Customer is starting our game (Dirk Dashing) in fullscreen mode with Safari and other apps running in the background. When they quit our game, the minimize buttons on all the other apps are disabled. This does not occur when running our game in Windowed mode. Here is our code for changing into fullscreen: const SDL_VideoInfo* info = SDL_GetVideoInfo(); if (info == NULL) { DEBUG("ERROR! Failed to get video information!"); exit(0); } int color_depth = info->vfmt->BitsPerPixel; SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5); SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5); SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5); SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); #ifdef WIN32 SDL_Surface* icon_surface = SDL_LoadBMP("./Textures/iconwin.bmp"); #else #ifdef LINUX SDL_Surface* icon_surface = SDL_LoadBMP("./Textures/icon.bmp"); #endif #endif SDL_WM_SetIcon(icon_surface, NULL); Uint32 flags = SDL_OPENGL; if (fullscreen) flags |= SDL_FULLSCREEN; SDL_Surface* surface = SDL_SetVideoMode(length, width, color_depth, flags); if (surface == NULL) { DEBUG("ERROR! Failed to set video mode!"); exit(0); } Am I doing something wrong, or is this a bug in SDL? This code works fine on both Windows and Linux, and it works on Mac OS X (except for the minimize buttons being disabled when the game quits).