all repos — mgba @ cf61eb52a40f5258ae6afae6e4acb01650a9d5c9

mGBA Game Boy Advance Emulator

Switch: Fix texture colors
Vicki Pfau vi@endrift.com
Tue, 18 Sep 2018 20:27:57 -0700
commit

cf61eb52a40f5258ae6afae6e4acb01650a9d5c9

parent

76d64114794ed7370e843ba74ec069a1f28913d5

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

jump to
M src/platform/switch/gui-font.csrc/platform/switch/gui-font.c

@@ -243,7 +243,7 @@ glUniform4f(font->colorLocation, 0.0, 0.0, 0.0, ((color >> 24) & 0xFF) / 128.0f);

glDrawArrays(GL_TRIANGLE_FAN, 0, 4); glUniform1f(font->cutoffLocation, 0.7f); - glUniform4f(font->colorLocation, ((color >> 16) & 0xFF) / 255.0f, ((color >> 8) & 0xFF) / 255.0f, (color & 0xFF) / 255.0f, ((color >> 24) & 0xFF) / 255.0f); + glUniform4f(font->colorLocation, (color & 0xFF) / 255.0f, ((color >> 8) & 0xFF) / 255.0f, ((color >> 16) & 0xFF) / 255.0f, ((color >> 24) & 0xFF) / 255.0f); glDrawArrays(GL_TRIANGLE_FAN, 0, 4); glDisableVertexAttribArray(font->offsetLocation);

@@ -312,7 +312,7 @@ glUniform4f(font->colorLocation, 0.0, 0.0, 0.0, ((color >> 24) & 0xFF) / 128.0f);

glDrawArrays(GL_TRIANGLE_FAN, 0, 4); glUniform1f(font->cutoffLocation, 0.7f); - glUniform4f(font->colorLocation, ((color >> 16) & 0xFF) / 255.0f, ((color >> 8) & 0xFF) / 255.0f, (color & 0xFF) / 255.0f, ((color >> 24) & 0xFF) / 255.0f); + glUniform4f(font->colorLocation, (color & 0xFF) / 255.0f, ((color >> 8) & 0xFF) / 255.0f, ((color >> 16) & 0xFF) / 255.0f, ((color >> 24) & 0xFF) / 255.0f); glDrawArrays(GL_TRIANGLE_FAN, 0, 4); glDisableVertexAttribArray(font->offsetLocation);