1
0
Fork 0

Allow 15/16/32 bpp inputs to the opengl output

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4095
This commit is contained in:
Sjoerd van der Berg 2018-04-16 20:24:30 +00:00
parent 84eaccc517
commit a315f74074

View file

@ -414,13 +414,16 @@ check_gotbpp:
goto check_gotbpp;
#endif
case SCREEN_OVERLAY:
//We only accept 32bit output from the scalers here
//Can't handle true color inputs
if (flags & GFX_RGBONLY || !(flags&GFX_CAN_32)) goto check_surface;
flags|=GFX_SCALING;
flags&=~(GFX_CAN_8|GFX_CAN_15|GFX_CAN_16);
break;
#if C_OPENGL
case SCREEN_OPENGL:
if (flags & GFX_RGBONLY || !(flags&GFX_CAN_32)) goto check_surface;
//We only accept 32bit output from the scalers here
if (!(flags&GFX_CAN_32)) goto check_surface;
flags|=GFX_SCALING;
flags&=~(GFX_CAN_8|GFX_CAN_15|GFX_CAN_16);
break;
@ -676,7 +679,7 @@ dosurface:
free(sdl.opengl.framebuf);
}
sdl.opengl.framebuf=0;
if (!(flags&GFX_CAN_32) || (flags & GFX_RGBONLY)) goto dosurface;
if (!(flags&GFX_CAN_32)) goto dosurface;
int texsize=2 << int_log2(width > height ? width : height);
if (texsize>sdl.opengl.max_texsize) {
LOG_MSG("SDL:OPENGL: No support for texturesize of %d, falling back to surface",texsize);