aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/gp2x
diff options
context:
space:
mode:
authorDavid-John Willis2011-04-11 16:31:29 +0100
committerDavid-John Willis2011-04-11 18:00:46 +0100
commit5661570e4efd6ac64cfdbca68515c78329d11a77 (patch)
tree3e932844bfca41cbe2bd6cae4806029a8abb2c1e /backends/platform/gp2x
parent18e35a638d3eaf1ea9941507e97c1f1eedf0abb0 (diff)
downloadscummvm-rg350-5661570e4efd6ac64cfdbca68515c78329d11a77.tar.gz
scummvm-rg350-5661570e4efd6ac64cfdbca68515c78329d11a77.tar.bz2
scummvm-rg350-5661570e4efd6ac64cfdbca68515c78329d11a77.zip
GP2X: Commit some cleanup/fudges with a view to collapsing into the GPH backend.
Diffstat (limited to 'backends/platform/gp2x')
-rw-r--r--backends/platform/gp2x/gp2x-common.h15
-rw-r--r--backends/platform/gp2x/gp2x-main.cpp10
-rw-r--r--backends/platform/gp2x/gp2x.cpp8
3 files changed, 18 insertions, 15 deletions
diff --git a/backends/platform/gp2x/gp2x-common.h b/backends/platform/gp2x/gp2x-common.h
index 4d2a9c33cc..2a06cab788 100644
--- a/backends/platform/gp2x/gp2x-common.h
+++ b/backends/platform/gp2x/gp2x-common.h
@@ -26,7 +26,11 @@
#ifndef PLATFORM_SDL_GP2X_H
#define PLATFORM_SDL_GP2X_H
+#include "backends/base-backend.h"
+#include "backends/platform/sdl/sdl.h"
#include "backends/platform/sdl/posix/posix.h"
+#include "backends/graphics/gp2xsdl/gp2xsdl-graphics.h"
+#include "backends/events/gp2xsdl/gp2xsdl-events.h"
#ifndef PATH_MAX
#define PATH_MAX 255
@@ -34,12 +38,15 @@
class OSystem_GP2X : public OSystem_POSIX {
public:
- virtual void initBackend();
- virtual void quit();
- virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
+ OSystem_GP2X() {}
+
+ void initBackend();
+ void quit();
+ void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
+ void initSDL();
protected:
- virtual void initSDL();
+
};
#endif
diff --git a/backends/platform/gp2x/gp2x-main.cpp b/backends/platform/gp2x/gp2x-main.cpp
index a194accd77..f1ee5ed5f3 100644
--- a/backends/platform/gp2x/gp2x-main.cpp
+++ b/backends/platform/gp2x/gp2x-main.cpp
@@ -18,15 +18,13 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "backends/platform/gp2x/gp2x-common.h"
-#include "backends/plugins/posix/posix-provider.h"
+#include "backends/plugins/sdl/sdl-provider.h"
#include "base/main.h"
+#if defined(GP2X)
int main(int argc, char *argv[]) {
// Create our OSystem instance
@@ -37,7 +35,7 @@ int main(int argc, char *argv[]) {
((OSystem_GP2X *)g_system)->init();
#ifdef DYNAMIC_MODULES
- PluginManager::instance().addPluginProvider(new POSIXPluginProvider());
+ PluginManager::instance().addPluginProvider(new SDLPluginProvider());
#endif
// Invoke the actual ScummVM main entry point:
@@ -48,3 +46,5 @@ int main(int argc, char *argv[]) {
return res;
}
+
+#endif
diff --git a/backends/platform/gp2x/gp2x.cpp b/backends/platform/gp2x/gp2x.cpp
index 8ae54d679c..4cdb4cd0d5 100644
--- a/backends/platform/gp2x/gp2x.cpp
+++ b/backends/platform/gp2x/gp2x.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -31,12 +28,11 @@
// Disable symbol overrides so that we can use system headers.
#define FORBIDDEN_SYMBOL_ALLOW_ALL
+#include "backends/platform/sdl/sdl-sys.h"
#include "backends/platform/gp2x/gp2x-common.h"
#include "backends/platform/gp2x/gp2x-hw.h"
#include "backends/platform/gp2x/gp2x-mem.h"
-#include "backends/graphics/gp2xsdl/gp2xsdl-graphics.h"
-#include "backends/events/gp2xsdl/gp2xsdl-events.h"
#include "backends/saves/default/default-saves.h"
#include "common/config-manager.h"
@@ -143,7 +139,7 @@ void OSystem_GP2X::initBackend() {
if (_graphicsManager == 0)
_graphicsManager = new GP2XSdlGraphicsManager(_eventSource);
- // Call parent implementation of this method
+ /* Pass to POSIX method to do the heavy lifting */
OSystem_POSIX::initBackend();
}