Created a simpler version of SDL_SetHint() that doesn't need a priority.
authorSam Lantinga <slouken@libsdl.org>
Sat, 05 Feb 2011 20:02:37 -0800
changeset 520001bced9a4cc1
parent 5199 164f20ba08eb
child 5201 523409574510
Created a simpler version of SDL_SetHint() that doesn't need a priority.
include/SDL_hints.h
src/SDL_hints.c
     1.1 --- a/include/SDL_hints.h	Sat Feb 05 16:07:10 2011 -0800
     1.2 +++ b/include/SDL_hints.h	Sat Feb 05 20:02:37 2011 -0800
     1.3 @@ -106,7 +106,7 @@
     1.4  
     1.5  
     1.6  /**
     1.7 - *  \brief Set a hint
     1.8 + *  \brief Set a hint with a specific priority
     1.9   *
    1.10   *  The priority controls the behavior when setting a hint that already
    1.11   *  has a value.  Hints will replace existing hints of their priority and
    1.12 @@ -114,9 +114,18 @@
    1.13   * 
    1.14   *  \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
    1.15   */
    1.16 +extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
    1.17 +                                                         const char *value,
    1.18 +                                                         SDL_HintPriority priority);
    1.19 +
    1.20 +/**
    1.21 + *  \brief Set a hint with normal priority
    1.22 + * 
    1.23 + *  \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
    1.24 + */
    1.25  extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
    1.26 -                                             const char *value,
    1.27 -                                             SDL_HintPriority priority);
    1.28 +                                             const char *value);
    1.29 +
    1.30  
    1.31  /**
    1.32   *  \brief Get a hint
     2.1 --- a/src/SDL_hints.c	Sat Feb 05 16:07:10 2011 -0800
     2.2 +++ b/src/SDL_hints.c	Sat Feb 05 20:02:37 2011 -0800
     2.3 @@ -38,7 +38,8 @@
     2.4  
     2.5  
     2.6  SDL_bool
     2.7 -SDL_SetHint(const char *name, const char *value, SDL_HintPriority priority)
     2.8 +SDL_SetHintWithPriority(const char *name, const char *value,
     2.9 +                        SDL_HintPriority priority)
    2.10  {
    2.11      const char *env;
    2.12      SDL_Hint *prev, *hint;
    2.13 @@ -80,6 +81,12 @@
    2.14      return SDL_TRUE;
    2.15  }
    2.16  
    2.17 +SDL_bool
    2.18 +SDL_SetHint(const char *name, const char *value)
    2.19 +{
    2.20 +    return SDL_SetHintWithPriority(name, value, SDL_HINT_NORMAL);
    2.21 +}
    2.22 +
    2.23  const char *
    2.24  SDL_GetHint(const char *name)
    2.25  {