From 48ee83b88957dab86bc763e9ef21a70179fa8679 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 3 Sep 2010 15:52:31 +0000 Subject: OPENGL: Properly initialize the graphics manager again. Starting with r52503 the graphics manager's only initialize their event observer when initEventObserver is called. It seems like it was an oversight that this was not done in OSystem_SDL::setGraphicsMode, when a new graphics manager was initialized. This should fix window resizing with the OpenGL graphic's manager and mouse movement. svn-id: r52506 --- backends/platform/sdl/sdl.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'backends') diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 3808a50780..5b38cbb9b4 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -358,10 +358,12 @@ bool OSystem_SDL::setGraphicsMode(int mode) { if (_graphicsMode >= _sdlModesCount && mode < _sdlModesCount) { delete _graphicsManager; _graphicsManager = new SdlGraphicsManager(); + ((SdlGraphicsManager *)_graphicsManager)->initEventObserver(); _graphicsManager->beginGFXTransaction(); } else if (_graphicsMode < _sdlModesCount && mode >= _sdlModesCount) { delete _graphicsManager; _graphicsManager = new OpenGLSdlGraphicsManager(); + ((OpenGLSdlGraphicsManager *)_graphicsManager)->initEventObserver(); _graphicsManager->beginGFXTransaction(); } _graphicsMode = mode; -- cgit v1.2.3