diff options
Diffstat (limited to 'backends/platform/posix/posix.cpp')
-rw-r--r-- | backends/platform/posix/posix.cpp | 68 |
1 files changed, 4 insertions, 64 deletions
diff --git a/backends/platform/posix/posix.cpp b/backends/platform/posix/posix.cpp index 8942ba1408..61871c7f82 100644 --- a/backends/platform/posix/posix.cpp +++ b/backends/platform/posix/posix.cpp @@ -31,7 +31,6 @@ #include "common/EventRecorder.h" #include "backends/saves/posix/posix-saves.h" - #include "backends/audiocd/sdl/sdl-audiocd.h" #include "backends/events/sdl/sdl-events.h" #include "backends/mutex/sdl/sdl-mutex.h" @@ -43,76 +42,17 @@ #define DEFAULT_CONFIG_FILE ".scummvmrc" OSystem_POSIX::OSystem_POSIX() { + // Initialze File System Factory _fsFactory = new POSIXFilesystemFactory(); } -OSystem_POSIX::~OSystem_POSIX() { - deinit(); -} - void OSystem_POSIX::initBackend() { - assert(!_inited); - - uint32 sdlFlags = 0; - - if (ConfMan.hasKey("disable_sdl_parachute")) - sdlFlags |= SDL_INIT_NOPARACHUTE; - - if (SDL_Init(sdlFlags) == -1) { - error("Could not initialize SDL: %s", SDL_GetError()); - } - - // Enable unicode support if possible - SDL_EnableUNICODE(1); - - // Create and hook up the mutex manager, if none exists yet (we check for - // this to allow subclasses to provide their own). - if (_mutexManager == 0) { - _mutexManager = new SdlMutexManager(); - } - - // Create and hook up the event manager, if none exists yet (we check for - // this to allow subclasses to provide their own). - if (_eventManager == 0) { - _eventManager = new SdlEventManager(this); - } - - // Create the savefile manager, if none exists yet (we check for this to - // allow subclasses to provide their own). - if (_savefileManager == 0) { + // Create the savefile manager + if (_savefileManager == 0) _savefileManager = new POSIXSaveFileManager(); - } - - // Create and hook up the mixer, if none exists yet (we check for this to - // allow subclasses to provide their own). - if (_mixer == 0) { - if (SDL_InitSubSystem(SDL_INIT_AUDIO) == -1) { - error("Could not initialize SDL: %s", SDL_GetError()); - } - - _mixer = new SdlMixerImpl(this); - } - - // Create and hook up the timer manager, if none exists yet (we check for - // this to allow subclasses to provide their own). - if (_timerManager == 0) { - _timerManager = new SdlTimerManager(); - } - - // Create and hook up the graphics manager, if none exists yet (we check for - // this to allow subclasses to provide their own). - if (_graphicsManager == 0) { - _graphicsManager = new SdlGraphicsManager(); - } - - if (_audiocdManager == 0) { - _audiocdManager = (AudioCDManager *)new SdlAudioCDManager(); - } // Invoke parent implementation of this method - OSystem::initBackend(); - - _inited = true; + OSystem_SDL::initBackend(); } Common::String OSystem_POSIX::getDefaultConfigFileName() { |