Menu

#385 opengl output falls back to surface output in truecolor modes

0.56
fixed
Sjoerd
None
1
2018-06-28
2012-12-02
No

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

Discussion

  • Bertram Felgenhauer

    Oops, I meant to change the milestone. Dosbox version is 0.74.

     
  • Brandon J. Van Every

    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.

     
  • Maks Verver

    Maks Verver - 2014-03-18

    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.

     
  • Le Gluon du Net

    Le Gluon du Net - 2017-10-20

    Hello,

    does this bug is still present in the last source or corrected?

     

    Last edit: Le Gluon du Net 2017-10-20
  • Bertram Felgenhauer

    Yes, this behavior persists. The patch still seems to work as well.

     
  • Le Gluon du Net

    Le Gluon du Net - 2017-10-20

    but this patch is for opengl only, not overlay? it works for all dosbox platform?

     
  • Bertram Felgenhauer

    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.

     
  • Qbix

    Qbix - 2018-06-28
    • status: open --> fixed
    • assigned_to: Sjoerd
     

Log in to post a comment.