src/video/x11/SDL_x11modes.c
changeset 6472 d4623b7209db
parent 6468 6af2a8db95d0
child 6475 71d39944810b
     1.1 --- a/src/video/x11/SDL_x11modes.c	Thu Sep 27 11:13:30 2012 -0700
     1.2 +++ b/src/video/x11/SDL_x11modes.c	Thu Sep 27 11:29:13 2012 -0700
     1.3 @@ -22,6 +22,7 @@
     1.4  
     1.5  #if SDL_VIDEO_DRIVER_X11
     1.6  
     1.7 +#include "SDL_hints.h"
     1.8  #include "SDL_x11video.h"
     1.9  
    1.10  /*#define X11MODES_DEBUG*/
    1.11 @@ -270,10 +271,10 @@
    1.12      *major = *minor = 0;
    1.13  
    1.14      /* Allow environment override */
    1.15 -    env = getenv("SDL_VIDEO_X11_XINERAMA");
    1.16 +    env = SDL_GetHint(SDL_HINT_VIDEO_X11_XINERAMA);
    1.17      if (env && !SDL_atoi(env)) {
    1.18  #ifdef X11MODES_DEBUG
    1.19 -        printf("Xinerama disabled due to environment variable\n");
    1.20 +        printf("Xinerama disabled due to hint\n");
    1.21  #endif
    1.22          return SDL_FALSE;
    1.23      }
    1.24 @@ -311,10 +312,10 @@
    1.25      *major = *minor = 0;
    1.26  
    1.27      /* Allow environment override */
    1.28 -    env = getenv("SDL_VIDEO_X11_XRANDR");
    1.29 +    env = SDL_GetHint(SDL_HINT_VIDEO_X11_XRANDR);
    1.30      if (env && !SDL_atoi(env)) {
    1.31  #ifdef X11MODES_DEBUG
    1.32 -        printf("XRandR disabled due to environment variable\n");
    1.33 +        printf("XRandR disabled due to hint\n");
    1.34  #endif
    1.35          return SDL_FALSE;
    1.36      }
    1.37 @@ -350,10 +351,10 @@
    1.38      *major = *minor = 0;
    1.39  
    1.40      /* Allow environment override */
    1.41 -    env = getenv("SDL_VIDEO_X11_XVIDMODE");
    1.42 +    env = SDL_GetHint(SDL_HINT_VIDEO_X11_XVIDMODE);
    1.43      if (env && !SDL_atoi(env)) {
    1.44  #ifdef X11MODES_DEBUG
    1.45 -        printf("XVidMode disabled due to environment variable\n");
    1.46 +        printf("XVidMode disabled due to hint\n");
    1.47  #endif
    1.48          return SDL_FALSE;
    1.49      }