aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorTarek Soliman2011-10-11 18:06:52 -0500
committerTarek Soliman2011-10-11 19:54:16 -0500
commit52fae5524c39044762b906ca938b99650d624491 (patch)
tree389be6a1537eb587b686aabbe2b1afa2b619b31e /backends/platform
parenta1fe57702ac394903df3bb9be331b87e28e38a73 (diff)
downloadscummvm-rg350-52fae5524c39044762b906ca938b99650d624491.tar.gz
scummvm-rg350-52fae5524c39044762b906ca938b99650d624491.tar.bz2
scummvm-rg350-52fae5524c39044762b906ca938b99650d624491.zip
MAEMO: Add basic structs to Maemo namespace
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/maemo/maemo-common.h29
-rw-r--r--backends/platform/maemo/maemo.cpp8
-rw-r--r--backends/platform/maemo/maemo.h6
3 files changed, 23 insertions, 20 deletions
diff --git a/backends/platform/maemo/maemo-common.h b/backends/platform/maemo/maemo-common.h
index 6da38d49b5..f33aa24278 100644
--- a/backends/platform/maemo/maemo-common.h
+++ b/backends/platform/maemo/maemo-common.h
@@ -25,28 +25,31 @@
#ifndef PLATFORM_SDL_MAEMO_COMMON_H
#define PLATFORM_SDL_MAEMO_COMMON_H
-enum MaemoModelType {
- kMaemoModelTypeN800 = 1,
- kMaemoModelTypeN810 = 2,
- kMaemoModelTypeN900 = 4,
- kMaemoModelTypeInvalid = 0
+namespace Maemo {
+
+enum ModelType {
+ kModelTypeN800 = 1,
+ kModelTypeN810 = 2,
+ kModelTypeN900 = 4,
+ kModelTypeInvalid = 0
};
-struct MaemoModel {
+struct Model {
const char *hwId;
- MaemoModelType modelType;
+ ModelType modelType;
const char *hwAlias;
bool hwKeyboard;
};
-static const MaemoModel maemoModels[] = {
- {"RX-34", kMaemoModelTypeN800, "N800", false},
- {"RX-44", kMaemoModelTypeN810, "N810", true},
- {"RX-48", kMaemoModelTypeN810, "N810W", true},
- {"RX-51", kMaemoModelTypeN900, "N900", true},
- {0, kMaemoModelTypeInvalid, 0, true}
+static const Model models[] = {
+ {"RX-34", kModelTypeN800, "N800", false},
+ {"RX-44", kModelTypeN810, "N810", true},
+ {"RX-48", kModelTypeN810, "N810W", true},
+ {"RX-51", kModelTypeN900, "N900", true},
+ {0, kModelTypeInvalid, 0, true}
};
+} // namespace Maemo
#endif // ifndef PLATFORM_SDL_MAEMO_COMMON_H
diff --git a/backends/platform/maemo/maemo.cpp b/backends/platform/maemo/maemo.cpp
index da5b61916f..4f05f5ccb2 100644
--- a/backends/platform/maemo/maemo.cpp
+++ b/backends/platform/maemo/maemo.cpp
@@ -47,7 +47,7 @@ void OSystem_SDL_Maemo::initBackend() {
ConfMan.set("vkeybdpath", DATA_PATH);
- _maemoModel = MaemoModel(detectMaemoModel());
+ _model = Maemo::Model(detectModel());
// Call parent implementation of this method
OSystem_POSIX::initBackend();
@@ -96,10 +96,10 @@ void OSystem_SDL_Maemo::setWindowCaption(const char *caption) {
setXWindowName(cap.c_str());
}
-const MaemoModel OSystem_SDL_Maemo::detectMaemoModel() {
+const Maemo::Model OSystem_SDL_Maemo::detectModel() {
Common::String deviceHwId = Common::String(getenv("SCUMMVM_MAEMO_DEVICE"));
- const MaemoModel *model;
- for (model = maemoModels; model->hwId; model++) {
+ const Maemo::Model *model;
+ for (model = Maemo::models; model->hwId; model++) {
if (deviceHwId.equals(model->hwId))
return *model;
}
diff --git a/backends/platform/maemo/maemo.h b/backends/platform/maemo/maemo.h
index e177000a16..c80639600e 100644
--- a/backends/platform/maemo/maemo.h
+++ b/backends/platform/maemo/maemo.h
@@ -38,13 +38,13 @@ public:
virtual void fatalError();
virtual void setWindowCaption(const char *caption);
- MaemoModel getMaemoModel() { return _maemoModel; }
+ Maemo::Model getModel() { return _model; }
private:
virtual void setXWindowName(const char *caption);
- const MaemoModel detectMaemoModel();
- MaemoModel _maemoModel;
+ const Maemo::Model detectModel();
+ Maemo::Model _model;
};