aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/bada/system.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2011-10-19 05:03:46 -0700
committerEugene Sandulenko2011-10-19 05:03:46 -0700
commit19134ecf7e543600fda7e9855ee4b3aa6822548c (patch)
treeae2f3917075cceb3ce74c34013bd48459f384c9d /backends/platform/bada/system.cpp
parent84bc5651271f70e470099a19ab197ef038ef4a3b (diff)
parented07b99b22c2cf092f207dc15b26801c502534ac (diff)
downloadscummvm-rg350-19134ecf7e543600fda7e9855ee4b3aa6822548c.tar.gz
scummvm-rg350-19134ecf7e543600fda7e9855ee4b3aa6822548c.tar.bz2
scummvm-rg350-19134ecf7e543600fda7e9855ee4b3aa6822548c.zip
Merge pull request #106 from chrisws/branch-1-4-c
BADA: Misc changes merged from appstore release
Diffstat (limited to 'backends/platform/bada/system.cpp')
-rw-r--r--backends/platform/bada/system.cpp29
1 files changed, 18 insertions, 11 deletions
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);
+ }
}
}