Symptom: setting windowresolution in dosbox.conf has no effect when running programs in truecolor mode. instead, the window is resized to the program's native resolution.
Analysis: In src/gui/render.cpp, the GFX_RGBONLY flag is set in the gfx flags for truecolor modes. In src/gui/sdlmain.cpp, both GFX_GetBestMode and GFX_SetupSurfaceScaled check that flag for the 'opengl' output, and refuse to use it when the flag is set. Removing these two checks makes the problem disappear. (They appear to be a copy of checks for the 'overlay' output, which I believe works in YUV colorspace.)
Additional information: I'm using dosbox in windowed mode under Linux
Oops, I meant to change the milestone. Dosbox version is 0.74.
I'm also using Dosbox 0.74 on Linux and see this behavior as well. Changing windowresolution has no effect. The result is an annoyingly small window on my 1440x900 screen.
This affects fullscreen mode too, not just windowed mode, and like Brandon says, this is very annoying on Linux because it means there is not a single output that supports scaling in RGB modes.
Attached is a simple patch following Bertram's suggestion, which does seem to fix the problem.
Hello,
does this bug is still present in the last source or corrected?
Last edit: Le Gluon du Net 2017-10-20
Yes, this behavior persists. The patch still seems to work as well.
but this patch is for opengl only, not overlay? it works for all dosbox platform?
Yes, the patch is for opengl only; the (SDL) overlay works in YUV color space, so I believe falling back to the plain surface when RGB data is provided is necessary there.
I cannot conveniently test this on anything but Linux. SDL and OpenGL both aim to be platform independent though so I expect this to work whenever OpenGL is available.