mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-17 18:28:28 +00:00
Implemented SDL_GetHintBoolean() to make it easier to check boolean hints
This commit is contained in:
parent
92d700f199
commit
27d4f09929
26 changed files with 68 additions and 136 deletions
|
@ -234,12 +234,11 @@ SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
hint = SDL_GetHint(SDL_HINT_RENDER_VSYNC);
|
||||
if (hint) {
|
||||
if (*hint == '0') {
|
||||
flags &= ~SDL_RENDERER_PRESENTVSYNC;
|
||||
} else {
|
||||
if (SDL_GetHint(SDL_HINT_RENDER_VSYNC)) {
|
||||
if (SDL_GetHintBoolean(SDL_HINT_RENDER_VSYNC, SDL_TRUE)) {
|
||||
flags |= SDL_RENDERER_PRESENTVSYNC;
|
||||
} else {
|
||||
flags &= ~SDL_RENDERER_PRESENTVSYNC;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue