Updated source to match SDL function prototype style

This commit is contained in:
Sam Lantinga
2023-05-23 10:59:03 -07:00
parent 92f72682e7
commit 3f1fd5abff
243 changed files with 1218 additions and 2364 deletions

View File

@@ -45,9 +45,7 @@ typedef struct SDL_Hint
static SDL_Hint *SDL_hints;
SDL_bool
SDL_SetHintWithPriority(const char *name, const char *value,
SDL_HintPriority priority)
SDL_bool SDL_SetHintWithPriority(const char *name, const char *value, SDL_HintPriority priority)
{
const char *env;
SDL_Hint *hint;
@@ -97,8 +95,7 @@ SDL_SetHintWithPriority(const char *name, const char *value,
return SDL_TRUE;
}
SDL_bool
SDL_ResetHint(const char *name)
SDL_bool SDL_ResetHint(const char *name)
{
const char *env;
SDL_Hint *hint;
@@ -154,14 +151,12 @@ void SDL_ResetHints(void)
}
}
SDL_bool
SDL_SetHint(const char *name, const char *value)
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)
const char *SDL_GetHint(const char *name)
{
const char *env;
SDL_Hint *hint;
@@ -178,8 +173,7 @@ SDL_GetHint(const char *name)
return env;
}
SDL_bool
SDL_GetStringBoolean(const char *value, SDL_bool default_value)
SDL_bool SDL_GetStringBoolean(const char *value, SDL_bool default_value)
{
if (value == NULL || !*value) {
return default_value;
@@ -190,8 +184,7 @@ SDL_GetStringBoolean(const char *value, SDL_bool default_value)
return SDL_TRUE;
}
SDL_bool
SDL_GetHintBoolean(const char *name, SDL_bool default_value)
SDL_bool SDL_GetHintBoolean(const char *name, SDL_bool default_value)
{
const char *hint = SDL_GetHint(name);
return SDL_GetStringBoolean(hint, default_value);