Open degaart opened 4 years ago
Just wanted to note that this goes for every VGA/SVGA machine. CGA, EGA and many others work just fine and show a normal screenshot with blue channel in it. So there's something specific to the VGA code that's causing this.
I recall vanilla DOSBox having a similar bug that only occurred on high color depth, like for example when playing Archimedean Dynasty.
Maybe the same bug as #727 even though that one's specifically about SDL1 and this is about SDL2.
This issue is still present with the SDL2 build as of 0.83.10
This issue is still persistent with the SDL2 build 0.83.24.
Anyone know how can we fix it? It'd be quite important because apparently the SDL2 build is more stable than SDL1, which I had been using for years because of this bug in particular...
I've experienced this too, and from a quick glance through the codebase I think it just assumes the pixel format of the SDL_Surface
returned from SDL_GetWindowSurface
without checking. And on MacOS it seems like it is BGRA on SDL1 while ARGB on SDL2.
It seems that some places check if defined(MACOSX) && !defined(C_SDL2)
but others only check if defined(MACOSX)
, causing it to incorrectly apply the correction to SDL2 as well.
I've tried to search for such places and added SDL2 checks to them, and the problem seems to be fixed. I'll make a pull request later, although I can't test them very thoroughly except for making sure that the Windows 3.1 doesn't look yellow in the particular video mode I'm using.
Describe the bug 15-bit, 16-bit, 24-bit and 32-bit color VBE applications give corrupted yellowish output on macOS.
To Reproduce Steps to reproduce the behavior:
Expected behavior Correct output
Screenshots
Environment (please complete the following information):
Additional context Looks like issue #614
Attached screenshot and debug log
dosbox-x-0.83-sdl2.log