diff src/video/photon/SDL_ph_modes.c @ 692:04dd6c6d7c30

Date: Fri, 15 Aug 2003 09:13:59 +0300 From: "Mike Gorchak" Subject: Patches for tests and QNX6 Here more fixes for the QNX6 in sdlqnx.diff file: - Spellchecked README.QNX (thanks to Julian Kinraid) - Fixed bugs in fullscreen mode: window region wasn't on top by default, so \ it caused some artifacts to be appeared on the screen, prevent window conten\ ts default filler in Photon while in fullscreen mode, it damages the screen. - Added support for the SDL_VIDEO_WINDOW_POS, SDL_VIDEO_CENTERED env variabl\ es. - Some minor code restructurization.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 23 Aug 2003 23:20:21 +0000
parents 8bedd6d61642
children b8d311d90021
line wrap: on
line diff
--- a/src/video/photon/SDL_ph_modes.c	Sat Aug 23 23:18:49 2003 +0000
+++ b/src/video/photon/SDL_ph_modes.c	Sat Aug 23 23:20:21 2003 +0000
@@ -297,13 +297,14 @@
 
         currently_fullscreen = 1;
     }
+    PgFlush();
 
     return 1;
 }
 
 int ph_LeaveFullScreen(_THIS)
 {
-    PgDisplaySettings_t mymode_settings;
+    PgDisplaySettings_t oldmode_settings;
        
     if (currently_fullscreen)
     {
@@ -332,11 +333,11 @@
             /* Restore old video mode */
             if (old_video_mode != -1)
             {
-                mymode_settings.mode = (unsigned short) old_video_mode;
-                mymode_settings.refresh = (unsigned short) old_refresh_rate;
-                mymode_settings.flags = 0;
+                oldmode_settings.mode = (unsigned short) old_video_mode;
+                oldmode_settings.refresh = (unsigned short) old_refresh_rate;
+                oldmode_settings.flags = 0;
                 
-                if (PgSetVideoMode(&mymode_settings) < 0)
+                if (PgSetVideoMode(&oldmode_settings) < 0)
                 {
                     SDL_SetError("Ph_LeaveFullScreen(): PgSetVideoMode() function failed !\n");
                     return 0;