comparison src/video/SDL_video.c @ 3489:e1bd98b56e94

Override renderer for OpenGL window, only in case if OpenGL or OpenGL ES renderers are enabled.
author Mike Gorchak <lestat@i.com.ua>
date Tue, 24 Nov 2009 19:28:27 +0000
parents 3d2f42580488
children 4b594623401b
comparison
equal deleted inserted replaced
3488:3d2f42580488 3489:e1bd98b56e94
1491 1491
1492 if (index < 0) { 1492 if (index < 0) {
1493 char *override = SDL_getenv("SDL_VIDEO_RENDERER"); 1493 char *override = SDL_getenv("SDL_VIDEO_RENDERER");
1494 int n = SDL_GetNumRenderDrivers(); 1494 int n = SDL_GetNumRenderDrivers();
1495 1495
1496 #if SDL_VIDEO_RENDER_OGL
1496 if (!override && (window->flags & SDL_WINDOW_OPENGL)) { 1497 if (!override && (window->flags & SDL_WINDOW_OPENGL)) {
1497 override = "opengl"; 1498 override = "opengl";
1498 } 1499 }
1500 #endif /* SDL_VIDEO_RENDER_OGL */
1501 #if SDL_VIDEO_RENDER_OGL_ES
1502 if (!override && (window->flags & SDL_WINDOW_OPENGL)) {
1503 override = "opengl_es";
1504 }
1505 #endif /* SDL_VIDEO_RENDER_OGL_ES */
1499 if (override) { 1506 if (override) {
1500 for (index = 0; index < n; ++index) { 1507 for (index = 0; index < n; ++index) {
1501 SDL_RenderDriver *driver = 1508 SDL_RenderDriver *driver =
1502 &SDL_CurrentDisplay.render_drivers[index]; 1509 &SDL_CurrentDisplay.render_drivers[index];
1503 1510