Merge with latest SDL code from hg.libsdl.org
authorDavidLudwig <dludwig@pobox.com>
Sun, 22 Jul 2012 23:50:51 -0400
changeset 8307 96ded98670c7
parent 8306 0e9d258470b3 (current diff)
parent 6380 3990b7d564d7 (diff)
child 8308 d0c4d87a1245
Merge with latest SDL code from hg.libsdl.org
src/video/uikit/SDL_uikitopengles.m
src/video/uikit/SDL_uikitwindow.m
--- a/src/video/uikit/SDL_uikitopengles.m	Sat Jul 21 13:52:20 2012 -0400
+++ b/src/video/uikit/SDL_uikitopengles.m	Sun Jul 22 23:50:51 2012 -0400
@@ -93,7 +93,6 @@
 
     /* 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)
--- a/src/video/uikit/SDL_uikitvideo.m	Sat Jul 21 13:52:20 2012 -0400
+++ b/src/video/uikit/SDL_uikitvideo.m	Sun Jul 22 23:50:51 2012 -0400
@@ -83,6 +83,8 @@
     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;
--- a/src/video/uikit/SDL_uikitwindow.h	Sat Jul 21 13:52:20 2012 -0400
+++ b/src/video/uikit/SDL_uikitwindow.h	Sun Jul 22 23:50:51 2012 -0400
@@ -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,
--- a/src/video/uikit/SDL_uikitwindow.m	Sat Jul 21 13:52:20 2012 -0400
+++ b/src/video/uikit/SDL_uikitwindow.m	Sun Jul 22 23:50:51 2012 -0400
@@ -214,6 +214,22 @@
 }
 
 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)
 {
     SDL_DisplayData *displaydata = (SDL_DisplayData *) display->driverdata;
--- a/src/video/windows/SDL_windowsopengl.c	Sat Jul 21 13:52:20 2012 -0400
+++ b/src/video/windows/SDL_windowsopengl.c	Sun Jul 22 23:50:51 2012 -0400
@@ -36,7 +36,7 @@
 #define WGL_CONTEXT_MAJOR_VERSION_ARB   0x2091
 #define WGL_CONTEXT_MINOR_VERSION_ARB   0x2092
 #define WGL_CONTEXT_LAYER_PLANE_ARB     0x2093
-#define WGL_CONTEXT_FLAGS_ARB           0x2093
+#define WGL_CONTEXT_FLAGS_ARB           0x2094
 #define WGL_CONTEXT_DEBUG_BIT_ARB       0x0001
 #define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB  0x0002