Update SDL to version 2.0.14.

This commit is contained in:
Alex Szpakowski
2020-12-23 22:00:38 -04:00
parent 72540d2d5a
commit 13584cee64
1051 changed files with 167187 additions and 71731 deletions
+12 -5
View File
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -22,6 +22,7 @@
#include "SDL_hints.h"
#include "SDL_error.h"
#include "SDL_hints_c.h"
/* Assuming there aren't many hints set and they aren't being queried in
@@ -119,18 +120,24 @@ SDL_GetHint(const char *name)
}
SDL_bool
SDL_GetHintBoolean(const char *name, SDL_bool default_value)
SDL_GetStringBoolean(const char *value, SDL_bool default_value)
{
const char *hint = SDL_GetHint(name);
if (!hint || !*hint) {
if (!value || !*value) {
return default_value;
}
if (*hint == '0' || SDL_strcasecmp(hint, "false") == 0) {
if (*value == '0' || SDL_strcasecmp(value, "false") == 0) {
return SDL_FALSE;
}
return SDL_TRUE;
}
SDL_bool
SDL_GetHintBoolean(const char *name, SDL_bool default_value)
{
const char *hint = SDL_GetHint(name);
return SDL_GetStringBoolean(hint, default_value);
}
void
SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
{