aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/gph/gph-backend.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2011-06-13 13:12:23 -0400
committerMatthew Hoops2011-06-13 13:12:23 -0400
commitd355475a0416897ed254fa85f4d63d0f75d9c7ea (patch)
tree184892480ebb704b28163c51999e50c414e85f8a /backends/platform/gph/gph-backend.cpp
parent224c71e483e09931ba386555ff3b436b9defe63d (diff)
parentbfa26ffc44f80e4eb3d8590f5f865cda6a5188b7 (diff)
downloadscummvm-rg350-d355475a0416897ed254fa85f4d63d0f75d9c7ea.tar.gz
scummvm-rg350-d355475a0416897ed254fa85f4d63d0f75d9c7ea.tar.bz2
scummvm-rg350-d355475a0416897ed254fa85f4d63d0f75d9c7ea.zip
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'backends/platform/gph/gph-backend.cpp')
-rw-r--r--backends/platform/gph/gph-backend.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/backends/platform/gph/gph-backend.cpp b/backends/platform/gph/gph-backend.cpp
index cb52da441d..ae3466b836 100644
--- a/backends/platform/gph/gph-backend.cpp
+++ b/backends/platform/gph/gph-backend.cpp
@@ -56,8 +56,15 @@
/* Dump console info to files. */
#define DUMP_STDOUT
+OSystem_GPH::OSystem_GPH()
+ :
+ OSystem_POSIX() {
+}
+
void OSystem_GPH::initBackend() {
+ assert(!_inited);
+
// Create the events manager
if (_eventSource == 0)
_eventSource = new GPHEventSource();
@@ -81,7 +88,7 @@ void OSystem_GPH::initBackend() {
char workDirName[PATH_MAX+1];
if (getcwd(workDirName, PATH_MAX) == NULL) {
- error("Could not obtain current working directory");
+ error("Could not obtain current working directory.");
} else {
printf("Current working directory: %s\n", workDirName);
}
@@ -155,7 +162,8 @@ void OSystem_GPH::initBackend() {
/* Trigger autosave every 4 minutes - On low batts 5 mins is about your warning time. */
ConfMan.registerDefault("autosave_period", 4 * 60);
- /* Make sure that aspect ratio correction is enabled on the 1st run to stop users asking me what the 'wasted space' is ;-). */
+ /* Make sure that aspect ratio correction is enabled on the 1st run to stop
+ users asking me what the 'wasted space' at the bottom is ;-). */
ConfMan.registerDefault("aspect_ratio", true);
/* Make sure SDL knows that we have a joystick we want to use. */
@@ -164,10 +172,10 @@ void OSystem_GPH::initBackend() {
/* Now setup any device specific user options (Left handed mode, that sort of thing). */
// GPH::setOptions();
- printf("%s\n", "Passing to OSystem::SDL initBackend.");
-
/* Pass to POSIX method to do the heavy lifting */
OSystem_POSIX::initBackend();
+
+ _inited = true;
}
void OSystem_GPH::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
@@ -176,7 +184,7 @@ void OSystem_GPH::addSysArchivesToSearchSet(Common::SearchSet &s, int priority)
char workDirName[PATH_MAX+1];
if (getcwd(workDirName, PATH_MAX) == NULL) {
- error("Error: Could not obtain current working directory");
+ error("Error: Could not obtain current working directory.");
}
Common::FSNode workdirNode(workDirName);
@@ -215,5 +223,5 @@ void OSystem_GPH::quit() {
fclose(stderr);
#endif /* DUMP_STDOUT */
- OSystem_SDL::quit();
+ OSystem_POSIX::quit();
}