aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/android/android.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/android/android.cpp')
-rw-r--r--backends/platform/android/android.cpp34
1 files changed, 10 insertions, 24 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("");