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:
parent
dedc74abfa
commit
0630a88a04
13 changed files with 150 additions and 48 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue