diff options
Diffstat (limited to 'backends/platform/gph')
-rw-r--r-- | backends/platform/gph/gph-backend.cpp | 20 | ||||
-rw-r--r-- | backends/platform/gph/gph-main.cpp | 4 | ||||
-rw-r--r-- | backends/platform/gph/gph-sdl.h | 4 |
3 files changed, 19 insertions, 9 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(); } diff --git a/backends/platform/gph/gph-main.cpp b/backends/platform/gph/gph-main.cpp index f91ec8f478..1a8c6686ca 100644 --- a/backends/platform/gph/gph-main.cpp +++ b/backends/platform/gph/gph-main.cpp @@ -21,7 +21,7 @@ */ #include "backends/platform/gph/gph-sdl.h" -#include "backends/plugins/sdl/sdl-provider.h" +#include "backends/plugins/posix/posix-provider.h" #include "base/main.h" #if defined(GPH_DEVICE) @@ -36,7 +36,7 @@ int main(int argc, char *argv[]) { ((OSystem_GPH *)g_system)->init(); #ifdef DYNAMIC_MODULES - PluginManager::instance().addPluginProvider(new SDLPluginProvider()); + PluginManager::instance().addPluginProvider(new POSIXPluginProvider()); #endif // Invoke the actual ScummVM main entry point: diff --git a/backends/platform/gph/gph-sdl.h b/backends/platform/gph/gph-sdl.h index 68a641eed7..8b943f98f3 100644 --- a/backends/platform/gph/gph-sdl.h +++ b/backends/platform/gph/gph-sdl.h @@ -28,8 +28,8 @@ #include "backends/base-backend.h" #include "backends/platform/sdl/sdl.h" #include "backends/platform/sdl/posix/posix.h" -#include "backends/graphics/gph/gph-graphics.h" #include "backends/events/gph/gph-events.h" +#include "backends/graphics/gph/gph-graphics.h" #define __GP2XWIZ__ @@ -39,6 +39,8 @@ class OSystem_GPH : public OSystem_POSIX { public: + OSystem_GPH(); + /* Platform Setup Stuff */ void addSysArchivesToSearchSet(Common::SearchSet &s, int priority); void initBackend(); |