From 91d3f9a03aaf97ebdab59e2caef99def82e6505e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Wed, 20 Mar 2024 19:42:49 +0100 Subject: [PATCH] cleanup --- engine/joint/v4k.h | 4 ++-- engine/split/v4k_render.c | 4 ++-- engine/v4k.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) 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");