From ed07b99b22c2cf092f207dc15b26801c502534ac Mon Sep 17 00:00:00 2001 From: Chris Warren-Smith Date: Mon, 17 Oct 2011 22:35:48 +1000 Subject: BADA: Misc changes merged from appstore release --- backends/platform/bada/system.cpp | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'backends/platform/bada/system.cpp') diff --git a/backends/platform/bada/system.cpp b/backends/platform/bada/system.cpp index 37d7028687..d284688068 100644 --- a/backends/platform/bada/system.cpp +++ b/backends/platform/bada/system.cpp @@ -45,6 +45,7 @@ using namespace Osp::Base::Runtime; using namespace Osp::Ui::Controls; #define DEFAULT_CONFIG_FILE "/Home/scummvm.ini" +#define RESOURCE_PATH "/Res" #define MUTEX_BUFFER_SIZE 5 // @@ -152,17 +153,17 @@ OSystem::MutexRef BadaMutexManager::createMutex() { } void BadaMutexManager::lockMutex(OSystem::MutexRef mutex) { - Mutex *m = (Mutex*)mutex; + Mutex *m = (Mutex *)mutex; m->Acquire(); } void BadaMutexManager::unlockMutex(OSystem::MutexRef mutex) { - Mutex *m = (Mutex*)mutex; + Mutex *m = (Mutex *)mutex; m->Release(); } void BadaMutexManager::deleteMutex(OSystem::MutexRef mutex) { - Mutex *m = (Mutex*)mutex; + Mutex *m = (Mutex *)mutex; for (int i = 0; i < MUTEX_BUFFER_SIZE; i++) { if (buffer[i] == m) { @@ -245,7 +246,7 @@ result BadaSystem::initModules() { return E_OUT_OF_MEMORY; } - _graphicsManager = (GraphicsManager*) new BadaGraphicsManager(_appForm); + _graphicsManager = (GraphicsManager *)new BadaGraphicsManager(_appForm); if (!_graphicsManager) { return E_OUT_OF_MEMORY; } @@ -266,7 +267,7 @@ result BadaSystem::initModules() { return E_OUT_OF_MEMORY; } - _audiocdManager = (AudioCDManager*) new DefaultAudioCDManager(); + _audiocdManager = (AudioCDManager *)new DefaultAudioCDManager(); if (!_audiocdManager) { return E_OUT_OF_MEMORY; } @@ -283,9 +284,6 @@ result BadaSystem::initModules() { void BadaSystem::initBackend() { logEntered(); - // allow translations and game .DAT files to be found - ConfMan.set("extrapath", "/Res"); - // use the mobile device theme ConfMan.set("gui_theme", "/Res/scummmobile"); @@ -304,7 +302,7 @@ void BadaSystem::initBackend() { } ConfMan.registerDefault("fullscreen", true); - ConfMan.registerDefault("aspect_ratio", true); + ConfMan.registerDefault("aspect_ratio", false); ConfMan.setBool("confirm_exit", false); Osp::System::SystemTime::GetTicks(_epoch); @@ -317,7 +315,7 @@ void BadaSystem::initBackend() { // replace kBigGUIFont using the large font from the scummmobile theme Common::File fontFile; - Common::String fileName = "/Res/scummmobile/helvB14-ASCII.fcc"; + Common::String fileName = "/Res/scummmobile/helvB14-iso-8859-1.fcc"; BadaFilesystemNode file(fileName); if (file.exists()) { Common::SeekableReadStream *stream = file.createReadStream(); @@ -335,6 +333,11 @@ void BadaSystem::initBackend() { logLeaving(); } +void BadaSystem::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) { + // allow translations.dat and game .DAT files to be found + s.addDirectory(RESOURCE_PATH, RESOURCE_PATH, priority); +} + void BadaSystem::destroyBackend() { closeAudio(); @@ -446,8 +449,12 @@ void BadaSystem::closeGraphics() { } void BadaSystem::setMute(bool on) { + // only change mute after eventManager init() has completed if (_audioThread) { - _audioThread->setMute(on); + BadaGraphicsManager *graphics = getGraphics(); + if (graphics && graphics->isReady()) { + _audioThread->setMute(on); + } } } -- cgit v1.2.3