src/SDL_compat.c
branchSDL-1.3
changeset 1733 0b1070f2f94d
parent 1731 875c3cf1a12c
child 1734 f7c667ded87d
--- a/src/SDL_compat.c	Sat Jul 08 20:55:39 2006 +0000
+++ b/src/SDL_compat.c	Sun Jul 09 09:02:26 2006 +0000
@@ -360,9 +360,8 @@
     if (flags & SDL_NOFRAME) {
         window_flags |= SDL_WINDOW_BORDERLESS;
     }
-    if (SDL_getenv("SDL_WINDOW_POS")) {
-    }
     GetEnvironmentWindowPosition(width, height, &window_x, &window_y);
+    SDL_SetFullscreenDisplayMode(NULL);
     SDL_VideoWindow =
         SDL_CreateWindow(wm_title, window_x, window_y, width, height,
                          window_flags);
@@ -427,21 +426,9 @@
 
     /* Set the desired display mode */
     if (flags & SDL_FULLSCREEN) {
-        if (!SDL_GetClosestDisplayMode(&mode, &mode)) {
+        if (SDL_SetFullscreenDisplayMode(&mode) < 0) {
             return NULL;
         }
-    } else {
-        if (desktop_format) {
-            mode.format = desktop_format;
-        }
-        if (desktop_mode->w && desktop_mode->h) {
-            mode.w = desktop_mode->w;
-            mode.h = desktop_mode->h;
-        }
-        mode.refresh_rate = desktop_mode->refresh_rate;
-    }
-    if (SDL_SetDisplayMode(&mode) < 0) {
-        return NULL;
     }
 
     /* If we're in OpenGL mode, just create a stub surface and we're done! */