comparison 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
comparison
equal deleted inserted replaced
691:609543e2b3a1 692:04dd6c6d7c30
295 295
296 OCImage.oldDC=PdDirectStart(OCImage.direct_context); 296 OCImage.oldDC=PdDirectStart(OCImage.direct_context);
297 297
298 currently_fullscreen = 1; 298 currently_fullscreen = 1;
299 } 299 }
300 PgFlush();
300 301
301 return 1; 302 return 1;
302 } 303 }
303 304
304 int ph_LeaveFullScreen(_THIS) 305 int ph_LeaveFullScreen(_THIS)
305 { 306 {
306 PgDisplaySettings_t mymode_settings; 307 PgDisplaySettings_t oldmode_settings;
307 308
308 if (currently_fullscreen) 309 if (currently_fullscreen)
309 { 310 {
310 if ((this->screen) && ((this->screen->flags & SDL_OPENGL)==SDL_OPENGL)) 311 if ((this->screen) && ((this->screen->flags & SDL_OPENGL)==SDL_OPENGL))
311 { 312 {
330 currently_fullscreen=0; 331 currently_fullscreen=0;
331 332
332 /* Restore old video mode */ 333 /* Restore old video mode */
333 if (old_video_mode != -1) 334 if (old_video_mode != -1)
334 { 335 {
335 mymode_settings.mode = (unsigned short) old_video_mode; 336 oldmode_settings.mode = (unsigned short) old_video_mode;
336 mymode_settings.refresh = (unsigned short) old_refresh_rate; 337 oldmode_settings.refresh = (unsigned short) old_refresh_rate;
337 mymode_settings.flags = 0; 338 oldmode_settings.flags = 0;
338 339
339 if (PgSetVideoMode(&mymode_settings) < 0) 340 if (PgSetVideoMode(&oldmode_settings) < 0)
340 { 341 {
341 SDL_SetError("Ph_LeaveFullScreen(): PgSetVideoMode() function failed !\n"); 342 SDL_SetError("Ph_LeaveFullScreen(): PgSetVideoMode() function failed !\n");
342 return 0; 343 return 0;
343 } 344 }
344 } 345 }