diff options
author | Johannes Schickel | 2010-09-03 15:52:31 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-09-03 15:52:31 +0000 |
commit | 48ee83b88957dab86bc763e9ef21a70179fa8679 (patch) | |
tree | 86e0f85eb3ad9f74b789cd70e36c80609c89bc0d /backends/platform/sdl/sdl.cpp | |
parent | 91367241102badf06c5955423d95aedf524ed864 (diff) | |
download | scummvm-rg350-48ee83b88957dab86bc763e9ef21a70179fa8679.tar.gz scummvm-rg350-48ee83b88957dab86bc763e9ef21a70179fa8679.tar.bz2 scummvm-rg350-48ee83b88957dab86bc763e9ef21a70179fa8679.zip |
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
Diffstat (limited to 'backends/platform/sdl/sdl.cpp')
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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; |