src/video/x11/SDL_x11modes.c
changeset 6472 d4623b7209db
parent 6468 6af2a8db95d0
child 6475 71d39944810b
equal deleted inserted replaced
6471:5f6990aaf357 6472:d4623b7209db
    20 */
    20 */
    21 #include "SDL_config.h"
    21 #include "SDL_config.h"
    22 
    22 
    23 #if SDL_VIDEO_DRIVER_X11
    23 #if SDL_VIDEO_DRIVER_X11
    24 
    24 
       
    25 #include "SDL_hints.h"
    25 #include "SDL_x11video.h"
    26 #include "SDL_x11video.h"
    26 
    27 
    27 /*#define X11MODES_DEBUG*/
    28 /*#define X11MODES_DEBUG*/
    28 
    29 
    29 static int
    30 static int
   268 
   269 
   269     /* Default the extension not available */
   270     /* Default the extension not available */
   270     *major = *minor = 0;
   271     *major = *minor = 0;
   271 
   272 
   272     /* Allow environment override */
   273     /* Allow environment override */
   273     env = getenv("SDL_VIDEO_X11_XINERAMA");
   274     env = SDL_GetHint(SDL_HINT_VIDEO_X11_XINERAMA);
   274     if (env && !SDL_atoi(env)) {
   275     if (env && !SDL_atoi(env)) {
   275 #ifdef X11MODES_DEBUG
   276 #ifdef X11MODES_DEBUG
   276         printf("Xinerama disabled due to environment variable\n");
   277         printf("Xinerama disabled due to hint\n");
   277 #endif
   278 #endif
   278         return SDL_FALSE;
   279         return SDL_FALSE;
   279     }
   280     }
   280 
   281 
   281     if (!SDL_X11_HAVE_XINERAMA) {
   282     if (!SDL_X11_HAVE_XINERAMA) {
   309 
   310 
   310     /* Default the extension not available */
   311     /* Default the extension not available */
   311     *major = *minor = 0;
   312     *major = *minor = 0;
   312 
   313 
   313     /* Allow environment override */
   314     /* Allow environment override */
   314     env = getenv("SDL_VIDEO_X11_XRANDR");
   315     env = SDL_GetHint(SDL_HINT_VIDEO_X11_XRANDR);
   315     if (env && !SDL_atoi(env)) {
   316     if (env && !SDL_atoi(env)) {
   316 #ifdef X11MODES_DEBUG
   317 #ifdef X11MODES_DEBUG
   317         printf("XRandR disabled due to environment variable\n");
   318         printf("XRandR disabled due to hint\n");
   318 #endif
   319 #endif
   319         return SDL_FALSE;
   320         return SDL_FALSE;
   320     }
   321     }
   321 
   322 
   322     if (!SDL_X11_HAVE_XRANDR) {
   323     if (!SDL_X11_HAVE_XRANDR) {
   348 
   349 
   349     /* Default the extension not available */
   350     /* Default the extension not available */
   350     *major = *minor = 0;
   351     *major = *minor = 0;
   351 
   352 
   352     /* Allow environment override */
   353     /* Allow environment override */
   353     env = getenv("SDL_VIDEO_X11_XVIDMODE");
   354     env = SDL_GetHint(SDL_HINT_VIDEO_X11_XVIDMODE);
   354     if (env && !SDL_atoi(env)) {
   355     if (env && !SDL_atoi(env)) {
   355 #ifdef X11MODES_DEBUG
   356 #ifdef X11MODES_DEBUG
   356         printf("XVidMode disabled due to environment variable\n");
   357         printf("XVidMode disabled due to hint\n");
   357 #endif
   358 #endif
   358         return SDL_FALSE;
   359         return SDL_FALSE;
   359     }
   360     }
   360 
   361 
   361     if (!SDL_X11_HAVE_XVIDMODE) {
   362     if (!SDL_X11_HAVE_XVIDMODE) {