SDL: Let SDL based graphics managers inherit from SdlGraphicsManager.

This also adapts port I can not test (not even the compilation). So if this
breaks anything I am sorry about it.
This commit is contained in:
Johannes Schickel 2011-08-08 23:46:05 +02:00
parent dedc74abfa
commit 0630a88a04
13 changed files with 150 additions and 48 deletions

View file

@ -174,7 +174,7 @@ void OSystem_SDL::initBackend() {
// If the gfx_mode is from OpenGL, create the OpenGL graphics manager
if (use_opengl) {
_graphicsManager = new OpenGLSdlGraphicsManager();
_graphicsManager = new OpenGLSdlGraphicsManager(_eventSource);
graphicsManagerType = 1;
}
}
@ -538,7 +538,7 @@ bool OSystem_SDL::setGraphicsMode(int mode) {
} else if (_graphicsMode < _sdlModesCount && mode >= _sdlModesCount) {
debug(1, "switching to OpenGL graphics");
delete _graphicsManager;
_graphicsManager = new OpenGLSdlGraphicsManager();
_graphicsManager = new OpenGLSdlGraphicsManager(_eventSource);
((OpenGLSdlGraphicsManager *)_graphicsManager)->initEventObserver();
_graphicsManager->beginGFXTransaction();
}