Fix problem with falsy shader flags;

This commit is contained in:
bjorn 2019-08-07 15:56:13 -07:00
parent 289d365866
commit b5be93b94b
1 changed files with 1 additions and 1 deletions

View File

@ -2050,7 +2050,7 @@ static char* lovrShaderGetFlagCode(ShaderFlag* flags, uint32_t flagCount) {
code[length] = '\0';
char* s = code;
for (uint32_t i = 0; i < flagCount; i++) {
if (flags[i].name) {
if (flags[i].name && !(flags[i].type == FLAG_BOOL && flags[i].value.b32 == false)) {
s += sprintf(s, "#define FLAG_%s", flags[i].name);
if (flags[i].type == FLAG_INT) {
s += sprintf(s, " %d", flags[i].value.i32);