diff options
author | Klaus Reimer | 2011-04-04 00:28:14 +0200 |
---|---|---|
committer | Max Horn | 2011-04-12 11:05:35 +0200 |
commit | a4e757834e1ea227c207072868ca732f9872ed59 (patch) | |
tree | b8064c4706a903fbc1b405acfb4437a97e4ed776 /backends/platform | |
parent | b17f7d20c28eda883b8c21ad3fedc6619ee04d5d (diff) | |
download | scummvm-rg350-a4e757834e1ea227c207072868ca732f9872ed59.tar.gz scummvm-rg350-a4e757834e1ea227c207072868ca732f9872ed59.tar.bz2 scummvm-rg350-a4e757834e1ea227c207072868ca732f9872ed59.zip |
WEBOS: Create webos backend with custom events
Currently only contains test code.
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/sdl/posix/posix-main.cpp | 2 | ||||
-rw-r--r-- | backends/platform/webos/main.cpp | 54 | ||||
-rw-r--r-- | backends/platform/webos/module.mk | 10 | ||||
-rw-r--r-- | backends/platform/webos/webos.cpp | 45 | ||||
-rw-r--r-- | backends/platform/webos/webos.h | 38 |
5 files changed, 148 insertions, 1 deletions
diff --git a/backends/platform/sdl/posix/posix-main.cpp b/backends/platform/sdl/posix/posix-main.cpp index 72777e1ab7..9e778ab899 100644 --- a/backends/platform/sdl/posix/posix-main.cpp +++ b/backends/platform/sdl/posix/posix-main.cpp @@ -25,7 +25,7 @@ #include "common/scummsys.h" -#if defined(UNIX) && !defined(MACOSX) && !defined(SAMSUNGTV) && !defined(LINUXMOTO) && !defined(GPH_DEVICE) && !defined(GP2X) && !defined(DINGUX) && !defined(OPENPANDORA) +#if defined(UNIX) && !defined(MACOSX) && !defined(SAMSUNGTV) && !defined(WEBOS) && !defined(LINUXMOTO) && !defined(GPH_DEVICE) && !defined(GP2X) && !defined(DINGUX) && !defined(OPENPANDORA) #include "backends/platform/sdl/posix/posix.h" #include "backends/plugins/sdl/sdl-provider.h" diff --git a/backends/platform/webos/main.cpp b/backends/platform/webos/main.cpp new file mode 100644 index 0000000000..fa10613630 --- /dev/null +++ b/backends/platform/webos/main.cpp @@ -0,0 +1,54 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * 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/webos/webos.h" +#include "backends/plugins/sdl/sdl-provider.h" +#include "base/main.h" + +#if defined(WEBOS) + +#include <unistd.h> + +int main(int argc, char* argv[]) { + + g_system = new OSystem_SDL_WebOS(); + assert(g_system); + + ((OSystem_SDL_WebOS *)g_system)->init(); + +#ifdef DYNAMIC_MODULES + PluginManager::instance().addPluginProvider(new SDLPluginProvider()); +#endif + + // Invoke the actual ScummVM main entry point: + int res = scummvm_main(argc, argv); + + // Free OSystem + delete (OSystem_SDL_WebOS *)g_system; + + return res; +} + +#endif diff --git a/backends/platform/webos/module.mk b/backends/platform/webos/module.mk new file mode 100644 index 0000000000..fe4ec1e079 --- /dev/null +++ b/backends/platform/webos/module.mk @@ -0,0 +1,10 @@ +MODULE := backends/platform/webos + +MODULE_OBJS := \ + main.o \ + webos.o + +# We don't use rules.mk but rather manually update OBJS and MODULE_DIRS. +MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) +OBJS := $(MODULE_OBJS) $(OBJS) +MODULE_DIRS += $(sort $(dir $(MODULE_OBJS))) diff --git a/backends/platform/webos/webos.cpp b/backends/platform/webos/webos.cpp new file mode 100644 index 0000000000..597da005ed --- /dev/null +++ b/backends/platform/webos/webos.cpp @@ -0,0 +1,45 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * 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/webos/webos.h" +#include "backends/events/webossdl/webossdl-events.h" + +#if defined(WEBOS) + +OSystem_SDL_WebOS::OSystem_SDL_WebOS() + : + OSystem_POSIX("/media/cryptofs/apps/usr/palm/applications/org.scummvm/scummvmrc") { +} + +void OSystem_SDL_WebOS::initBackend() { + // Create the events manager + if (_eventSource == 0) + _eventSource = new WebOSSdlEventSource(); + + // Call parent implementation of this method + OSystem_SDL::initBackend(); +} + +#endif diff --git a/backends/platform/webos/webos.h b/backends/platform/webos/webos.h new file mode 100644 index 0000000000..be35547131 --- /dev/null +++ b/backends/platform/webos/webos.h @@ -0,0 +1,38 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * 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$ + * + */ + +#ifndef PLATFORM_SDL_WEBOS_H +#define PLATFORM_SDL_WEBOS_H + +#include "backends/platform/sdl/posix/posix.h" + +class OSystem_SDL_WebOS : public OSystem_POSIX { +public: + OSystem_SDL_WebOS(); + + virtual void initBackend(); +}; + +#endif |