comparison src/video/SDL_video.c @ 3092:cad1aefa2ed9

Date: Thu, 12 Mar 2009 15:14:38 +0200 From: "Mike Gorchak" Subject: New QNX patches In photon.tar.gz there are new files to be placed into ./src/video/photon/ directory. qnx3.diff - new patches for QNX support. Since I've found a lot of bugs in the new GF QNX Graphics Framework and I'm suspended development for GF driver until already found bugs will be fixed and switched to Photon driver implementation. sdl.diff - I've found that renderer creation result has not been checked and SDL shows error like: "there is no current renderer", now SDL will show correct error which was set be renderer.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 17 Mar 2009 03:24:22 +0000
parents 32efcc94b3da
children 82e60908fab1
comparison
equal deleted inserted replaced
3091:32efcc94b3da 3092:cad1aefa2ed9
662 } 662 }
663 if (!SDL_GetClosestDisplayMode(mode, &fullscreen_mode)) { 663 if (!SDL_GetClosestDisplayMode(mode, &fullscreen_mode)) {
664 SDL_SetError("Couldn't find display mode match"); 664 SDL_SetError("Couldn't find display mode match");
665 return -1; 665 return -1;
666 } 666 }
667
667 if (SDL_memcmp 668 if (SDL_memcmp
668 (&fullscreen_mode, &display->fullscreen_mode, 669 (&fullscreen_mode, &display->fullscreen_mode,
669 sizeof(fullscreen_mode)) == 0) { 670 sizeof(fullscreen_mode)) == 0) {
670 /* Nothing to do... */ 671 /* Nothing to do... */
671 return 0; 672 return 0;
1490 SDL_DestroyRenderer(windowID); 1491 SDL_DestroyRenderer(windowID);
1491 1492
1492 /* Create a new renderer instance */ 1493 /* Create a new renderer instance */
1493 window->renderer = SDL_CurrentDisplay.render_drivers[index] 1494 window->renderer = SDL_CurrentDisplay.render_drivers[index]
1494 .CreateRenderer(window, flags); 1495 .CreateRenderer(window, flags);
1496
1497 if (window->renderer==NULL)
1498 {
1499 /* Assuming renderer set its error */
1500 return -1;
1501 }
1502
1495 SDL_SelectRenderer(window->id); 1503 SDL_SelectRenderer(window->id);
1496 1504
1497 return 0; 1505 return 0;
1498 } 1506 }
1499 1507