src/video/uikit/SDL_uikitwindow.m
changeset 5246 58265e606e4e
parent 5154 fb424691cfc7
child 5249 7a963be087ef
--- a/src/video/uikit/SDL_uikitwindow.m	Thu Feb 10 14:36:09 2011 -0800
+++ b/src/video/uikit/SDL_uikitwindow.m	Thu Feb 10 14:44:25 2011 -0800
@@ -40,7 +40,7 @@
 
 static int SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bool created)
 {
-    SDL_VideoDisplay *display = window->display;
+    SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
     UIScreen *uiscreen = (UIScreen *) display->driverdata;
     SDL_WindowData *data;
         
@@ -85,9 +85,9 @@
 }
 
 int
-UIKit_CreateWindow(_THIS, SDL_Window *window) {
-        
-    SDL_VideoDisplay *display = window->display;
+UIKit_CreateWindow(_THIS, SDL_Window *window)
+{
+    SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
     UIScreen *uiscreen = (UIScreen *) display->driverdata;
 
     // SDL currently puts this window at the start of display's linked list. We rely on this.