diff options
author | Strangerke | 2011-06-29 16:15:41 +0200 |
---|---|---|
committer | Strangerke | 2011-06-29 16:15:41 +0200 |
commit | b0c9c9122fc678074aba30068e5b36d347208e65 (patch) | |
tree | 79a99db08ec985f2e5f1e216823b1104d5b753fb /backends/platform/android | |
parent | f2f3124246a77036f843dee2d83ad28084234ebc (diff) | |
parent | c32a3ea0d30336771bab460ecccb58c4614e6294 (diff) | |
download | scummvm-rg350-b0c9c9122fc678074aba30068e5b36d347208e65.tar.gz scummvm-rg350-b0c9c9122fc678074aba30068e5b36d347208e65.tar.bz2 scummvm-rg350-b0c9c9122fc678074aba30068e5b36d347208e65.zip |
Merge branch 'master' of github.com:scummvm/scummvm into soltys_wip2
Diffstat (limited to 'backends/platform/android')
-rw-r--r-- | backends/platform/android/android.cpp | 34 | ||||
-rw-r--r-- | backends/platform/android/android.h | 8 | ||||
-rw-r--r-- | backends/platform/android/jni.cpp | 3 |
3 files changed, 13 insertions, 32 deletions
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp index a67ee51b4d..17c7d4f9cb 100644 --- a/backends/platform/android/android.cpp +++ b/backends/platform/android/android.cpp @@ -132,10 +132,7 @@ OSystem_Android::OSystem_Android(int audio_sample_rate, int audio_buffer_size) : _show_mouse(false), _show_overlay(false), _enable_zoning(false), - _savefile(0), _mixer(0), - _timer(0), - _fsFactory(new POSIXFilesystemFactory()), _shake_offset(0), _event_queue_lock(createMutex()), _touch_pt_down(), @@ -149,6 +146,9 @@ OSystem_Android::OSystem_Android(int audio_sample_rate, int audio_buffer_size) : _dpad_scale(4), _fingersDown(0), _trackball_scale(2) { + + _fsFactory = new POSIXFilesystemFactory(); + Common::String mf = getSystemProperty("ro.product.manufacturer"); LOGI("Running on: [%s] [%s] [%s] [%s] [%s] SDK:%s ABI:%s", @@ -170,17 +170,17 @@ OSystem_Android::OSystem_Android(int audio_sample_rate, int audio_buffer_size) : OSystem_Android::~OSystem_Android() { ENTER(); - delete _savefile; - delete _timer; delete _mixer; + _mixer = 0; delete _fsFactory; + _fsFactory = 0; deleteMutex(_event_queue_lock); } void *OSystem_Android::timerThreadFunc(void *arg) { OSystem_Android *system = (OSystem_Android *)arg; - DefaultTimerManager *timer = (DefaultTimerManager *)(system->_timer); + DefaultTimerManager *timer = (DefaultTimerManager *)(system->_timerManager); // renice this thread to boost the audio thread if (setpriority(PRIO_PROCESS, 0, 19) < 0) @@ -359,8 +359,8 @@ void OSystem_Android::initBackend() { // BUG: "transient" ConfMan settings get nuked by the options // screen. Passing the savepath in this way makes it stick // (via ConfMan.registerDefault) - _savefile = new DefaultSaveFileManager(ConfMan.get("savepath")); - _timer = new DefaultTimerManager(); + _savefileManager = new DefaultSaveFileManager(ConfMan.get("savepath")); + _timerManager = new DefaultTimerManager(); gettimeofday(&_startTime, 0); @@ -389,7 +389,7 @@ void OSystem_Android::initBackend() { JNI::setReadyForEvents(true); - BaseBackend::initBackend(); + EventsBaseBackend::initBackend(); } void OSystem_Android::addPluginDirectories(Common::FSList &dirs) const { @@ -423,7 +423,7 @@ void OSystem_Android::setFeatureState(Feature f, bool enable) { showVirtualKeyboard(enable); break; case kFeatureCursorPalette: - _use_mouse_palette = !enable; + _use_mouse_palette = enable; if (!enable) disableCursorPalette(); break; @@ -535,21 +535,11 @@ void OSystem_Android::showVirtualKeyboard(bool enable) { JNI::showVirtualKeyboard(enable); } -Common::SaveFileManager *OSystem_Android::getSavefileManager() { - assert(_savefile); - return _savefile; -} - Audio::Mixer *OSystem_Android::getMixer() { assert(_mixer); return _mixer; } -Common::TimerManager *OSystem_Android::getTimerManager() { - assert(_timer); - return _timer; -} - void OSystem_Android::getTimeAndDate(TimeDate &td) const { struct tm tm; const time_t curTime = time(0); @@ -563,10 +553,6 @@ void OSystem_Android::getTimeAndDate(TimeDate &td) const { td.tm_year = tm.tm_year; } -FilesystemFactory *OSystem_Android::getFilesystemFactory() { - return _fsFactory; -} - void OSystem_Android::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) { ENTER(""); diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h index b70fdb7c30..c2ada2ab77 100644 --- a/backends/platform/android/android.h +++ b/backends/platform/android/android.h @@ -103,7 +103,7 @@ protected: }; #endif -class OSystem_Android : public BaseBackend, public PaletteManager { +class OSystem_Android : public EventsBaseBackend, public PaletteManager { private: // passed from the dark side int _audio_sample_rate; @@ -152,10 +152,7 @@ private: bool _enable_zoning; bool _virtkeybd_on; - Common::SaveFileManager *_savefile; Audio::MixerImpl *_mixer; - Common::TimerManager *_timer; - FilesystemFactory *_fsFactory; timeval _startTime; Common::String getSystemProperty(const char *name) const; @@ -289,11 +286,8 @@ public: virtual void displayMessageOnOSD(const char *msg); virtual void showVirtualKeyboard(bool enable); - virtual Common::SaveFileManager *getSavefileManager(); virtual Audio::Mixer *getMixer(); virtual void getTimeAndDate(TimeDate &t) const; - virtual Common::TimerManager *getTimerManager(); - virtual FilesystemFactory *getFilesystemFactory(); virtual void logMessage(LogMessageType::Type type, const char *message); virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0); diff --git a/backends/platform/android/jni.cpp b/backends/platform/android/jni.cpp index c4daf24e16..e3b4ef7401 100644 --- a/backends/platform/android/jni.cpp +++ b/backends/platform/android/jni.cpp @@ -22,8 +22,9 @@ #if defined(__ANDROID__) -// Allow use of stuff in <time.h> +// Allow use of stuff in <time.h> and abort() #define FORBIDDEN_SYMBOL_EXCEPTION_time_h +#define FORBIDDEN_SYMBOL_EXCEPTION_abort // Disable printf override in common/forbidden.h to avoid // clashes with log.h from the Android SDK. |