mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-18 18:58:27 +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
|
@ -390,7 +390,6 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||
{
|
||||
SDL_Renderer *renderer;
|
||||
GL_RenderData *data;
|
||||
const char *hint;
|
||||
GLint value;
|
||||
Uint32 window_flags;
|
||||
int profile_mask = 0, major = 0, minor = 0;
|
||||
|
@ -528,8 +527,7 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||
}
|
||||
|
||||
/* Check for shader support */
|
||||
hint = SDL_GetHint(SDL_HINT_RENDER_OPENGL_SHADERS);
|
||||
if (!hint || *hint != '0') {
|
||||
if (SDL_GetHintBoolean(SDL_HINT_RENDER_OPENGL_SHADERS, SDL_TRUE)) {
|
||||
data->shaders = GL_CreateShaderContext();
|
||||
}
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_RENDER, "OpenGL shaders: %s",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue