SDL: Reduce code duplication a bit.

Now instead of initializing this in OSystem_SDL::initSDL (and in subclasses
overwriting this) we simply initialize it in OSystem_SDL::init.
This commit is contained in:
Johannes Schickel 2013-10-22 12:24:20 +02:00
parent c323dedf3c
commit 092d36f392
4 changed files with 6 additions and 24 deletions

View file

@ -126,6 +126,12 @@ void OSystem_SDL::init() {
// Initialize SDL
initSDL();
// Enable unicode support if possible
SDL_EnableUNICODE(1);
// Disable OS cursor
SDL_ShowCursor(SDL_DISABLE);
if (!_logger)
_logger = new Backends::Log::Log(this);
@ -268,12 +274,6 @@ void OSystem_SDL::initSDL() {
if (SDL_Init(sdlFlags) == -1)
error("Could not initialize SDL: %s", SDL_GetError());
// Enable unicode support if possible
SDL_EnableUNICODE(1);
// Disable OS cursor
SDL_ShowCursor(SDL_DISABLE);
_initedSDL = true;
}
}