comparison 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
comparison
equal deleted inserted replaced
717:42ed44b2c8b6 718:cbc0f7fabd1c
62 static int ph_GL_LoadLibrary(_THIS, const char* path); 62 static int ph_GL_LoadLibrary(_THIS, const char* path);
63 static void* ph_GL_GetProcAddress(_THIS, const char* proc); 63 static void* ph_GL_GetProcAddress(_THIS, const char* proc);
64 static int ph_GL_MakeCurrent(_THIS); 64 static int ph_GL_MakeCurrent(_THIS);
65 #endif /* HAVE_OPENGL */ 65 #endif /* HAVE_OPENGL */
66 66
67 static int phstatus=-1;
68
67 static int ph_Available(void) 69 static int ph_Available(void)
68 { 70 {
69 int phstat=-1; 71 if (phstatus==-1)
70 72 {
71 phstat=PtInit(0); 73 phstatus=PtInit(NULL);
72 if (phstat==0) 74 if (phstatus==0)
73 { 75 {
74 return 1; 76 return 1;
75 } 77 }
76 else 78 else
77 { 79 {
78 return 0; 80 return 0;
79 } 81 }
82 }
83 return 1;
80 } 84 }
81 85
82 static SDL_VideoDevice *ph_CreateDevice(int devindex) 86 static SDL_VideoDevice *ph_CreateDevice(int devindex)
83 { 87 {
84 SDL_VideoDevice *device; 88 SDL_VideoDevice *device;