diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h index b0b1877..7d132b7 100644 --- a/engine/joint/v4k.h +++ b/engine/joint/v4k.h @@ -370122,10 +370122,10 @@ unsigned shader(const char *vs, const char *fs, const char *attribs, const char static inline char *shader_preprocess(const char *src, const char *defines) { - const char *glsl_version = va("#version %s", ifdef(ems, "300 es", "150")); - if (!src) return NULL; + const char *glsl_version = va("#version %s", ifdef(ems, "300 es", "150")); + // detect GLSL version if set if (src[0] == '#' && src[1] == 'v') { const char *end = strstri(src, "\n"); diff --git a/engine/split/v4k_render.c b/engine/split/v4k_render.c index ad641b5..bef8e53 100644 --- a/engine/split/v4k_render.c +++ b/engine/split/v4k_render.c @@ -94,10 +94,10 @@ unsigned shader(const char *vs, const char *fs, const char *attribs, const char static inline char *shader_preprocess(const char *src, const char *defines) { - const char *glsl_version = va("#version %s", ifdef(ems, "300 es", "150")); - if (!src) return NULL; + const char *glsl_version = va("#version %s", ifdef(ems, "300 es", "150")); + // detect GLSL version if set if (src[0] == '#' && src[1] == 'v') { const char *end = strstri(src, "\n"); diff --git a/engine/v4k.c b/engine/v4k.c index ecc4b35..48268c6 100644 --- a/engine/v4k.c +++ b/engine/v4k.c @@ -17268,10 +17268,10 @@ unsigned shader(const char *vs, const char *fs, const char *attribs, const char static inline char *shader_preprocess(const char *src, const char *defines) { - const char *glsl_version = va("#version %s", ifdef(ems, "300 es", "150")); - if (!src) return NULL; + const char *glsl_version = va("#version %s", ifdef(ems, "300 es", "150")); + // detect GLSL version if set if (src[0] == '#' && src[1] == 'v') { const char *end = strstri(src, "\n");