# HG changeset patch # User Sam Lantinga # Date 1296964957 28800 # Node ID 01bced9a4cc107c8deb16bf57764a1da6a129150 # Parent 164f20ba08eb33dccb2ecf54f1dbaf8c32e92f7d Created a simpler version of SDL_SetHint() that doesn't need a priority. diff -r 164f20ba08eb -r 01bced9a4cc1 include/SDL_hints.h --- a/include/SDL_hints.h Sat Feb 05 16:07:10 2011 -0800 +++ b/include/SDL_hints.h Sat Feb 05 20:02:37 2011 -0800 @@ -106,7 +106,7 @@ /** - * \brief Set a hint + * \brief Set a hint with a specific priority * * The priority controls the behavior when setting a hint that already * has a value. Hints will replace existing hints of their priority and @@ -114,9 +114,18 @@ * * \return SDL_TRUE if the hint was set, SDL_FALSE otherwise */ +extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name, + const char *value, + SDL_HintPriority priority); + +/** + * \brief Set a hint with normal priority + * + * \return SDL_TRUE if the hint was set, SDL_FALSE otherwise + */ extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name, - const char *value, - SDL_HintPriority priority); + const char *value); + /** * \brief Get a hint diff -r 164f20ba08eb -r 01bced9a4cc1 src/SDL_hints.c --- a/src/SDL_hints.c Sat Feb 05 16:07:10 2011 -0800 +++ b/src/SDL_hints.c Sat Feb 05 20:02:37 2011 -0800 @@ -38,7 +38,8 @@ SDL_bool -SDL_SetHint(const char *name, const char *value, SDL_HintPriority priority) +SDL_SetHintWithPriority(const char *name, const char *value, + SDL_HintPriority priority) { const char *env; SDL_Hint *prev, *hint; @@ -80,6 +81,12 @@ return SDL_TRUE; } +SDL_bool +SDL_SetHint(const char *name, const char *value) +{ + return SDL_SetHintWithPriority(name, value, SDL_HINT_NORMAL); +} + const char * SDL_GetHint(const char *name) {