all repos — mgba @ ded463ea25eb4752a612cbe0c53a578ec3b4666f

mGBA Game Boy Advance Emulator

OpenGL: Readable name fixes
Jeffrey Pfau jeffrey@endrift.com
Thu, 19 Nov 2015 23:49:50 -0800
commit

ded463ea25eb4752a612cbe0c53a578ec3b4666f

parent

0de98898a328e6449766a27cb0fc53cdb2a9edeb

2 files changed, 4 insertions(+), 1 deletions(-)

jump to
M res/shaders/ags001.shader/manifest.inires/shaders/ags001.shader/manifest.ini

@@ -19,14 +19,17 @@ [uniform.lightBrightness]

type=float default=1 pass[0]=false +readableName=Light brightness [uniform.reflectionBrightness] type=float default=0.07 pass[0]=false +readableName=Reflection brightness [uniform.reflectionDistance] type=float2 default[0]=0 default[1]=0.025 pass[0]=false +readableName=Reflection distance
M src/platform/opengl/gles2.csrc/platform/opengl/gles2.c

@@ -683,13 +683,13 @@ }

_loadValue(description, uniform->name, uniform->type, "default", &uniform->value); _loadValue(description, uniform->name, uniform->type, "min", &uniform->min); _loadValue(description, uniform->name, uniform->type, "max", &uniform->max); - uniform->name = strdup(uniform->name + strlen("uniform.")); const char* readable = ConfigurationGetValue(description, uniform->name, "readableName"); if (readable) { uniform->readableName = strdup(readable); } else { uniform->readableName = 0; } + uniform->name = strdup(uniform->name + strlen("uniform.")); return true; }