[Scummvm-git-logs] scummvm branch-2-2 -> cbaa9cfd92b6fc80c904c928f23c64168a464eab

criezy criezy at scummvm.org
Sun Oct 4 20:30:51 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
cbaa9cfd92 SDL: Prefer OpenGL over Metal rendering on macOS


Commit: cbaa9cfd92b6fc80c904c928f23c64168a464eab
    https://github.com/scummvm/scummvm/commit/cbaa9cfd92b6fc80c904c928f23c64168a464eab
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2020-10-04T21:30:33+01:00

Commit Message:
SDL: Prefer OpenGL over Metal rendering on macOS

SDL 2.0.10 and above favors Metal over OpenGL rendering on macOS, but
this currently causes blurriness issues on Retina displays.

Going back to OpenGL rendering works around this bug for now.

Users can override this with the SDL_RENDER_DRIVER environment variable.

c59bf95ba85b25b1 and 70f79d3df8b4a9d4 are still a requirement to
work around this bug, too.

Bug #11430.

Changed paths:
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp


diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 61e031e605..1454dce7d1 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2633,6 +2633,14 @@ SDL_Surface *SurfaceSdlGraphicsManager::SDL_SetVideoMode(int width, int height,
 		return nullptr;
 	}
 
+#if defined(MACOSX) && SDL_VERSION_ATLEAST(2, 0, 10)
+	// WORKAROUND: Bug #11430: "macOS: blurry content on Retina displays"
+	// Since SDL 2.0.10, Metal takes priority over OpenGL rendering on macOS,
+	// but this causes blurriness issues on Retina displays. Just switch
+	// back to OpenGL for now.
+	SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl");
+#endif
+
 	_renderer = SDL_CreateRenderer(_window->getSDLWindow(), -1, 0);
 	if (!_renderer) {
 		deinitializeRenderer();




More information about the Scummvm-git-logs mailing list