Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SURFACESDL: Implemented fallback in case lack of VSYNC #3500

merged 2 commits into from Nov 8, 2021


Copy link

@aquadran aquadran commented Nov 7, 2021

Added fallback for SDL surface backend in case lack of VSYNC.
Missing VSYNC is possible in case SDL renderer doesn't support, like dummy driver or system GFX driver not able (broken) or can not enable it (lack VSYNC on output).

Tested only with "SDL_VIDEODRIVER=dummy"

Along with changes added missing kFeatureVSync functionality for getFeatureState()

@aquadran aquadran merged commit 543e53e into scummvm:master Nov 8, 2021
5 of 8 checks passed
@@ -2585,8 +2589,17 @@ SDL_Surface *SurfaceSdlGraphicsManager::SDL_SetVideoMode(int width, int height,

_renderer = SDL_CreateRenderer(_window->getSDLWindow(), -1, rendererFlags);
if (!_renderer) {
return nullptr;
if (_vsync) {
Copy link

@bluegr bluegr Nov 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could check for rendererFlags & SDL_RENDERER_PRESENTVSYNC here, no need for a separate flag


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
2 participants