3d: Ensure shader fragment ends with a newline

The `defines` string in load_shader() is prepended to the glsl file, but
it was not terminated with a newline, so the resulting shader source
looked like this:

    #define REIGN_ENGINE 0
    #define TAPIR_ENGINE 1
    #define ENGINE 1/* Copyright (C) ...
     *
     * This program is free software; ...
    ...

This confused some OpenGL ES implementations, causing a syntax error.
https://github.com/kichikuou/xsystem4-android/issues/15
This commit is contained in:
kichikuou
2025-06-24 18:34:46 +09:00
parent ffb9fbae31
commit c86977ad1b
+1 -1
View File
@@ -66,7 +66,7 @@ static GLuint load_shader(const char *vertex_shader_path, const char *fragment_s
snprintf(defines, sizeof(defines),
"#define REIGN_ENGINE %d\n"
"#define TAPIR_ENGINE %d\n"
"#define ENGINE %d",
"#define ENGINE %d\n",
RE_REIGN_PLUGIN,
RE_TAPIR_PLUGIN,
re_plugin_version);