Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DisplayYUVOverlay: Don't update screen surface if clean
Currently, if there are multiple SDL_DisplayYUVOverlay() calls in a row, we force an SDL_Flip() between them, in order to make sure that the screen is updated. However, this results in the non-YUV video surface also being updated, even if it otherwise wouldn't be. Instead, copy the code from all of the other places where we force an update of the screen, which checks if the surface is dirty, and if not calls PresentScreen() directly without updating the VideoSurface. (After checking we're in the correct thread, of course...) This hopefully fixes video artefacts in Alpha Centauri (bug libsdl-org#279)
- Loading branch information