Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fix for the Game Center status window always being behind the SDL win…

…dow (untested!)
  • Loading branch information
slouken committed Jul 22, 2012
1 parent 92792d7 commit 3d72e94c54f4e877362d0887587dddf5b7916655
@@ -90,13 +90,9 @@ void UIKit_GL_SwapWindow(_THIS, SDL_Window * window)
return;
}
[data->view swapBuffers];
/* since now we've got something to draw
make the window visible */
[data->uiwindow makeKeyAndVisible];

/* we need to let the event cycle run, or the OS won't update the OpenGL view! */
SDL_PumpEvents();

}

SDL_GLContext UIKit_GL_CreateContext(_THIS, SDL_Window * window)
@@ -83,6 +83,8 @@ static void UIKit_DeleteDevice(SDL_VideoDevice * device)
device->SetDisplayMode = UIKit_SetDisplayMode;
device->PumpEvents = UIKit_PumpEvents;
device->CreateWindow = UIKit_CreateWindow;
device->ShowWindow = UIKit_ShowWindow;
device->HideWindow = UIKit_HideWindow;
device->SetWindowFullscreen = UIKit_SetWindowFullscreen;
device->DestroyWindow = UIKit_DestroyWindow;
device->GetWindowWMInfo = UIKit_GetWindowWMInfo;
@@ -29,6 +29,8 @@
typedef struct SDL_WindowData SDL_WindowData;

extern int UIKit_CreateWindow(_THIS, SDL_Window * window);
extern void UIKit_ShowWindow(_THIS, SDL_Window * window);
extern void UIKit_HideWindow(_THIS, SDL_Window * window);
extern void UIKit_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen);
extern void UIKit_DestroyWindow(_THIS, SDL_Window * window);
extern SDL_bool UIKit_GetWindowWMInfo(_THIS, SDL_Window * window,
@@ -210,6 +210,22 @@ static int SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bo

}

void
UIKit_ShowWindow(_THIS, SDL_Window * window)
{
UIWindow *uiwindow = ((SDL_WindowData *) window->driverdata)->uiwindow;

[uiwindow makeKeyAndVisible];
}

void
UIKit_HideWindow(_THIS, SDL_Window * window)
{
UIWindow *uiwindow = ((SDL_WindowData *) window->driverdata)->uiwindow;

uiwindow.hidden = YES;
}

void
UIKit_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen)
{

0 comments on commit 3d72e94

Please sign in to comment.