From 0f6e231356305043bc7f66ae1cbe2c3a0607c68a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 11 Aug 2011 04:25:46 +0200 Subject: SDL: Implement a hellish workaround to fix bug #3368143. The bug in question is "SDL/OpenGL: Crash when switching renderer backend". To fix it I added a stupid graphics state copying to the SDL backend, in case the graphics manager is switched. The implementation of this is considered a pure workaround, no one should ever do it like this in reality... I just want to die when looking at this... Not sure why I actually committed it. Anyway it at least makes the OpenGL backend testable for those who do not want to fiddle with the config file directly. --- backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'backends/graphics/surfacesdl') diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index 81c439e7e2..146200148a 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -249,7 +249,10 @@ void SurfaceSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) } bool SurfaceSdlGraphicsManager::getFeatureState(OSystem::Feature f) { - assert(_transactionMode == kTransactionNone); + // We need to allow this to be called from within a transaction, since we + // currently use it to retreive the graphics state, when switching from + // SDL->OpenGL mode for example. + //assert(_transactionMode == kTransactionNone); switch (f) { case OSystem::kFeatureFullscreenMode: -- cgit v1.2.3