Fix bug in shader_glsl.c

This commit is contained in:
twinaphex 2017-04-21 23:10:55 +02:00
parent 284e6b2994
commit d77da6b53d

View File

@ -758,15 +758,7 @@ static void *gl_glsl_init(void *data, const char *path)
bool ret = false;
const char *path_ext = path_get_extension(path);
if (memcmp(path_ext, "glsl", 4) == 0)
{
strlcpy(glsl->shader->pass[0].source.path, path,
sizeof(glsl->shader->pass[0].source.path));
glsl->shader->passes = 1;
glsl->shader->modern = true;
ret = true;
}
else if (memcmp(path_ext, "glslp", 5) == 0)
if (memcmp(path_ext, "glslp", 5) == 0)
{
conf = config_file_new(path);
if (conf)
@ -775,6 +767,14 @@ static void *gl_glsl_init(void *data, const char *path)
glsl->shader->modern = true;
}
}
else if (memcmp(path_ext, "glsl", 4) == 0)
{
strlcpy(glsl->shader->pass[0].source.path, path,
sizeof(glsl->shader->pass[0].source.path));
glsl->shader->passes = 1;
glsl->shader->modern = true;
ret = true;
}
if (!ret)
{