mirror of https://github.com/mgba-emu/mgba.git
Support 5_6_5 in SDL/GL port
This commit is contained in:
parent
ca23c47aeb
commit
0b9d6e03f1
|
@ -183,7 +183,11 @@ static void _GBASDLRunloop(struct GBAThread* context, struct GLSoftwareRenderer*
|
||||||
if (GBASyncWaitFrameStart(&context->sync, context->frameskip)) {
|
if (GBASyncWaitFrameStart(&context->sync, context->frameskip)) {
|
||||||
glBindTexture(GL_TEXTURE_2D, renderer->tex);
|
glBindTexture(GL_TEXTURE_2D, renderer->tex);
|
||||||
#ifdef COLOR_16_BIT
|
#ifdef COLOR_16_BIT
|
||||||
|
#ifdef COLOR_5_6_5
|
||||||
|
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, renderer->d.outputBuffer);
|
||||||
|
#else
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV, renderer->d.outputBuffer);
|
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV, renderer->d.outputBuffer);
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, renderer->d.outputBuffer);
|
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, renderer->d.outputBuffer);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue