SDL: Fix trying to set unsupported pixel format when changing gfx mode #2744
Conversation
When switching between the SDL and OpenGL graphics managers, trying to restore the state could fail as the two managers do not have the same list of supported formats, so we may not be able to transfer the pixel format from one to the other. This then resulted in an assert. This fixes bug #12079
Merging this now. I am not particularly happy with the solution, but after two weeks I still don't have a better idea. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When switching between the SDL and OpenGL graphics managers, trying to restore the state could fail as the two managers do not have the same list of supported formats, so we may not be able to transfer the pixel format from one to the other. This then resulted in an assert.
This fixes bug #12079.
I am not sure the way I fixed it is the best way to do it. So I am opening that pull request for review before merging.