[Scummvm-git-logs] scummvm master -> 31caab89e1e7fe6494a4da2fbb743b90bb509450

lephilousophe noreply at scummvm.org
Sat May 28 13:50:53 UTC 2022


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:
31caab89e1 SDL: Make sure a context exists when calling SDL_GL_GetAttribute


Commit: 31caab89e1e7fe6494a4da2fbb743b90bb509450
    https://github.com/scummvm/scummvm/commit/31caab89e1e7fe6494a4da2fbb743b90bb509450
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-05-28T15:49:54+02:00

Commit Message:
SDL: Make sure a context exists when calling SDL_GL_GetAttribute

Changed paths:
    backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp


diff --git a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
index fa827e0d709..adc5632d416 100644
--- a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
+++ b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
@@ -248,11 +248,12 @@ void OpenGLSdlGraphics3dManager::setupScreen() {
 
 #if SDL_VERSION_ATLEAST(2, 0, 0)
 	bool needsWindowReset = false;
-	if (_window->getSDLWindow()) {
+	if (_window->getSDLWindow() && SDL_GL_GetCurrentContext()) {
 		// The anti-aliasing setting cannot be changed without recreating the window.
 		// So check if the window needs to be recreated.
 
 		int currentSamples = 0;
+
 		#if defined(__EMSCRIPTEN__)
 		// SDL_GL_MULTISAMPLESAMPLES isn't available on a  WebGL 1.0 context 
 		// (or not bridged in Emscripten?). This forces a windows reset.




More information about the Scummvm-git-logs mailing list