@Zukow While you do not start making hack-version of SDL, if you have an interest you can follow there: https://github.com/dreamer/dosbox-staging/issues/144, the man who tries to fix it inside of DOSBox invite you as well, so we all can test/discuss things there.
I mean, it surely better to fix DOSBox than making some hacks in SDLs.
EDIT: Oh, and he was able to fix things the way you suggest, just he change different PMAKEs in some other places. See: https://github.com/dreamer/dosbox-staging/blob/77bff33870aed1622df871820e91ba470bb9f676/src/gui/render_templates.h
And result in all 16bit modes and 32bit modes in a window and in fullscreen rendered correctly on our side now:
In other words, no need for SDL hacking, and Jmarsh is wrong (At least, about "PMAke will not fix your issues"). It fixes it, just they need to be placed in another place.
The only mode which still have wrong colors now is 15bit one, but that one probably can be fixed by another PMAKE.