diff src/video/photon/SDL_ph_video.c @ 718:cbc0f7fabd1c

Date: Sat, 13 Sep 2003 15:50:43 +0300 From: "Mike Gorchak" Subject: QNX fixes improved sound code for the QNX, added workarounds for known bugs, fixed photon detect code. Update .qpg file.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 21 Sep 2003 18:13:48 +0000
parents aaf3b8af6616
children b14fdadd8311
line wrap: on
line diff
--- a/src/video/photon/SDL_ph_video.c	Mon Sep 15 13:51:25 2003 +0000
+++ b/src/video/photon/SDL_ph_video.c	Sun Sep 21 18:13:48 2003 +0000
@@ -64,19 +64,23 @@
 static int   ph_GL_MakeCurrent(_THIS);
 #endif /* HAVE_OPENGL */
 
+static int phstatus=-1;
+
 static int ph_Available(void)
 {
-    int phstat=-1;
-
-    phstat=PtInit(0);
-    if (phstat==0)
+    if (phstatus==-1)
     {
-       return 1;
+        phstatus=PtInit(NULL);
+        if (phstatus==0)
+        {
+           return 1;
+        }
+        else
+        {
+           return 0;
+        }
     }
-    else
-    {
-       return 0;
-    }
+    return 1;
 }
 
 static SDL_VideoDevice *ph_CreateDevice(int devindex)