summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/SDL2/src/SDL_hints.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-11-16 16:26:13 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2016-11-16 16:28:01 +0100
commit47a05778bff9388fc6c479461dd3804c79d7b539 (patch)
treebb3d4dc8df676b8aa478339b3fd0cd305dc4ac4d /3rdparty/SDL2/src/SDL_hints.c
parente61b392edfbfe5b9d70908c087632da915a3abd8 (diff)
Updated SDL2 to 2.0.5 (nw)
Diffstat (limited to '3rdparty/SDL2/src/SDL_hints.c')
-rw-r--r--3rdparty/SDL2/src/SDL_hints.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/3rdparty/SDL2/src/SDL_hints.c b/3rdparty/SDL2/src/SDL_hints.c
index 04523327ade..390d94f9f12 100644
--- a/3rdparty/SDL2/src/SDL_hints.c
+++ b/3rdparty/SDL2/src/SDL_hints.c
@@ -118,6 +118,19 @@ SDL_GetHint(const char *name)
return env;
}
+SDL_bool
+SDL_GetHintBoolean(const char *name, SDL_bool default_value)
+{
+ const char *hint = SDL_GetHint(name);
+ if (!hint) {
+ return default_value;
+ }
+ if (*hint == '0' || SDL_strcasecmp(hint, "false") == 0) {
+ return SDL_FALSE;
+ }
+ return SDL_TRUE;
+}
+
void
SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
{