diff src/video/photon/SDL_ph_modes.c @ 910:4ab6d1fd028f

Date: Sat, 26 Jun 2004 14:58:42 +0300 From: "Mike Gorchak" Subject: QNX 6.3 fixes for SDL Sam, I've added new OpenGL framework for SDL, which appeared in the new QNX version - 6.3. I've leave compatibility with previous QNX versions. And I've moved all GL specific functions to the separate module, like it done for the other platforms. SDL is now ready for the QNX 6.3 :)
author Sam Lantinga <slouken@libsdl.org>
date Sun, 18 Jul 2004 19:46:38 +0000
parents 30168104389f
children f72cc0c7305f
line wrap: on
line diff
--- a/src/video/photon/SDL_ph_modes.c	Sun Jul 18 19:44:06 2004 +0000
+++ b/src/video/photon/SDL_ph_modes.c	Sun Jul 18 19:46:38 2004 +0000
@@ -253,7 +253,7 @@
     return -1;
 }
 
-int ph_EnterFullScreen(_THIS, SDL_Surface* screen)
+int ph_EnterFullScreen(_THIS, SDL_Surface* screen, int fmode)
 {
     PgDisplaySettings_t settings;
     int mode;
@@ -326,24 +326,30 @@
             if ((this->screen->flags & SDL_OPENGL)==SDL_OPENGL)
             {
 #ifdef HAVE_OPENGL
+    #if (_NTO_VERSION < 630)
+                return 0;
+    #endif /* 6.3.0 */
+#else
+                return 0;
 #endif /* HAVE_OPENGL */
-                return 0;
             }
         }
 
-        if (OCImage.direct_context==NULL)
+        if (fmode==0)
         {
-            OCImage.direct_context=(PdDirectContext_t*)PdCreateDirectContext();
-            if (!OCImage.direct_context)
+            if (OCImage.direct_context==NULL)
             {
-                SDL_SetError("ph_EnterFullScreen(): Can't create direct context !\n");
-                ph_LeaveFullScreen(this);
-                return 0;
+                OCImage.direct_context=(PdDirectContext_t*)PdCreateDirectContext();
+                if (!OCImage.direct_context)
+                {
+                    SDL_SetError("ph_EnterFullScreen(): Can't create direct context !\n");
+                    ph_LeaveFullScreen(this);
+                    return 0;
+                }
             }
+            OCImage.oldDC=PdDirectStart(OCImage.direct_context);
         }
 
-        OCImage.oldDC=PdDirectStart(OCImage.direct_context);
-
         currently_fullscreen = 1;
     }
     PgFlush();
@@ -360,10 +366,15 @@
         if ((this->screen) && ((this->screen->flags & SDL_OPENGL)==SDL_OPENGL))
         {
 #ifdef HAVE_OPENGL
+    #if (_NTO_VERSION < 630)
+            return 0;
+    #endif /* 6.3.0 */
+#else
+            return 0;
 #endif /* HAVE_OPENGL */
-           return 0;
         }
-        else
+
+        /* release routines starts here */
         {
             if (OCImage.direct_context)
             {