void OSystem_PalmBase::initBackend() { if (gVars->autoSave != -1) ConfMan.setInt("autosave_period", gVars->autoSave); _keyExtra.bitUp = keyBitPageUp; _keyExtra.bitDown = keyBitPageDown; _keyExtra.bitLeft = keyBitHard2; _keyExtra.bitRight = keyBitHard3; int_initBackend(); _keyExtraMask = (_keyExtra.bitUp | _keyExtra.bitDown | _keyExtra.bitLeft | _keyExtra.bitRight | _keyExtra.bitActionA | _keyExtra.bitActionB); // Create the savefile manager, if none exists yet (we check for this to // allow subclasses to provide their own). if (_saveMgr == 0) { _saveMgr = new DefaultSaveFileManager(DEFAULT_SAVE_PATH); } // Create and hook up the mixer, if none exists yet (we check for this to // allow subclasses to provide their own). if (_mixerMgr == 0) { _mixerMgr = new Audio::MixerImpl(this); setSoundCallback(0, _mixerMgr); // setSoundCallback(Audio::Mixer::mixCallback, _mixerMgr); } // Create and hook up the timer manager, if none exists yet (we check for // this to allow subclasses to provide their own). if (_timerMgr == 0) { _timerMgr = new DefaultTimerManager(); setTimerCallback(::timer_handler, 10); } OSystem::initBackend(); }
void MidiDriver_MT32::close() { if (!_isOpen) return; _isOpen = false; // Detach the player callback handler setTimerCallback(NULL, NULL); // Detach the mixer callback handler _mixer->stopHandle(_mixerSoundHandle); _synth->close(); deleteMuntStructures(); }
void OSystem_IPHONE::initBackend() { #ifdef IPHONE_SANDBOXED _savefileManager = new DefaultSaveFileManager(iPhone_getDocumentsDir()); #else _savefileManager = new DefaultSaveFileManager(SCUMMVM_SAVE_PATH); #endif _timerManager = new DefaultTimerManager(); gettimeofday(&_startTime, NULL); setupMixer(); setTimerCallback(&OSystem_IPHONE::timerHandler, 10); EventsBaseBackend::initBackend(); }
void OSystem_GP32::quit() { NP("OSys::quit()"); clearSoundCallback(); setTimerCallback(0, 0); exit(0); }