comparison 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
comparison
equal deleted inserted replaced
909:e247a0139900 910:4ab6d1fd028f
251 int ph_ToggleFullScreen(_THIS, int on) 251 int ph_ToggleFullScreen(_THIS, int on)
252 { 252 {
253 return -1; 253 return -1;
254 } 254 }
255 255
256 int ph_EnterFullScreen(_THIS, SDL_Surface* screen) 256 int ph_EnterFullScreen(_THIS, SDL_Surface* screen, int fmode)
257 { 257 {
258 PgDisplaySettings_t settings; 258 PgDisplaySettings_t settings;
259 int mode; 259 int mode;
260 char* refreshrate; 260 char* refreshrate;
261 int refreshratenum; 261 int refreshratenum;
324 if (this->screen) 324 if (this->screen)
325 { 325 {
326 if ((this->screen->flags & SDL_OPENGL)==SDL_OPENGL) 326 if ((this->screen->flags & SDL_OPENGL)==SDL_OPENGL)
327 { 327 {
328 #ifdef HAVE_OPENGL 328 #ifdef HAVE_OPENGL
329 #if (_NTO_VERSION < 630)
330 return 0;
331 #endif /* 6.3.0 */
332 #else
333 return 0;
329 #endif /* HAVE_OPENGL */ 334 #endif /* HAVE_OPENGL */
330 return 0; 335 }
331 } 336 }
332 } 337
333 338 if (fmode==0)
334 if (OCImage.direct_context==NULL) 339 {
335 { 340 if (OCImage.direct_context==NULL)
336 OCImage.direct_context=(PdDirectContext_t*)PdCreateDirectContext(); 341 {
337 if (!OCImage.direct_context) 342 OCImage.direct_context=(PdDirectContext_t*)PdCreateDirectContext();
338 { 343 if (!OCImage.direct_context)
339 SDL_SetError("ph_EnterFullScreen(): Can't create direct context !\n"); 344 {
340 ph_LeaveFullScreen(this); 345 SDL_SetError("ph_EnterFullScreen(): Can't create direct context !\n");
341 return 0; 346 ph_LeaveFullScreen(this);
342 } 347 return 0;
343 } 348 }
344 349 }
345 OCImage.oldDC=PdDirectStart(OCImage.direct_context); 350 OCImage.oldDC=PdDirectStart(OCImage.direct_context);
351 }
346 352
347 currently_fullscreen = 1; 353 currently_fullscreen = 1;
348 } 354 }
349 PgFlush(); 355 PgFlush();
350 356
358 if (currently_fullscreen) 364 if (currently_fullscreen)
359 { 365 {
360 if ((this->screen) && ((this->screen->flags & SDL_OPENGL)==SDL_OPENGL)) 366 if ((this->screen) && ((this->screen->flags & SDL_OPENGL)==SDL_OPENGL))
361 { 367 {
362 #ifdef HAVE_OPENGL 368 #ifdef HAVE_OPENGL
369 #if (_NTO_VERSION < 630)
370 return 0;
371 #endif /* 6.3.0 */
372 #else
373 return 0;
363 #endif /* HAVE_OPENGL */ 374 #endif /* HAVE_OPENGL */
364 return 0; 375 }
365 } 376
366 else 377 /* release routines starts here */
367 { 378 {
368 if (OCImage.direct_context) 379 if (OCImage.direct_context)
369 { 380 {
370 PdDirectStop(OCImage.direct_context); 381 PdDirectStop(OCImage.direct_context);
371 PdReleaseDirectContext(OCImage.direct_context); 382 PdReleaseDirectContext(OCImage.direct_context);