From a315f740744e7c1aebb436464a6039531d25a4e0 Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Mon, 16 Apr 2018 20:24:30 +0000 Subject: [PATCH] Allow 15/16/32 bpp inputs to the opengl output Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4095 --- src/gui/sdlmain.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp index 8a4fe325..8062239b 100644 --- a/src/gui/sdlmain.cpp +++ b/src/gui/sdlmain.cpp @@ -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);