Add a SDL12COMPAT_MAX_BPP hint, and use it to restrict Hyperspace Delivery Boy to 16bpp (fixes #317) #321
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some games (e.g. Hyperspace Delivery Boy) only work on a 16-bit display,
but request the highest bit-depth available. Add a hint which makes all
queries for a mode (including the current mode, and the implicit format
chosen by providng SDL_SetVideoMode() a bpp of 0) report a bit depth
less than or equal to the value of SDL12COMPAT_FORCE_BPP.
We then add a quirk to force Hyperspace Delivery Boy to 16-bit, as it uses
the current video mode's bpp, but for 32-bit modes relies heavily on the
exact way format conversion was broken in some SDL 1.2 versions.
There are a few interesting "features" of this implementation:
of the hint. This seems like something we'd probably want anyway, as
many SDL 1.2 apps would have trouble with >32bit video modes anway
(and we never properly supported them).
function.
screen if the application specifically requests a bit depth. It only
changes defaults and reported modes.
Regardless, this seems, at least to me, to be a better solution than trying
to emulate all of the ways different versions of SDL 1.2 could get format
conversion wrong. And, if you're bored, you can force games to run at 8bpp
and enjoy the horrible colour banding.