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:
parent
c323dedf3c
commit
092d36f392
4 changed files with 6 additions and 24 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue