[Scummvm-cvs-logs] scummvm master -> fbc58d21ffe7e869b6d6387c72c02fdba32431d8

fingolfin max at quendi.de
Tue Apr 12 11:17:50 CEST 2011


This automated email contains information about 22 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f8a73665d3 WEBOS: Add build support for webos
72d206dc73 WEBOS: Add WEBOS define
7c5c6803ab WEBOS: Add webos backend
b17f7d20c2 WEBOS: Strip binary before packaging it
a4e757834e WEBOS: Create webos backend with custom events
48dbbdcd74 COMMON: Fix usage of wrong variable when keymapper is active
aa79a2634d WEBOS: Enable keymapper, implement FORWARD key and right+middle button clicks
ba97f8daf3 WEBOS: Correct package name, fix default key mapping
a899ec286f WEBOS: Correct package directory name
2160ecfe3a WEBOS: Disable vkeybd, fix more directory references with wrong package name
e5dab6672c GIT: Add Eclipse .settings directory to gitignore
6c94353eff WEBOS: Complete rewrite of key/mouse events handling
874ef4a73f WEBOS: Add a README file
20863c761b WEBOS: Add installation instructions to README
872e6f9b8c WEBOS: Move scummvmrc to ScummVM data directory
2a2d65051d WEBOS: Correct executable flag on start script
1bc38d2532 WEBOS: Use STRIP variable to strip the binary
91e43bb136 WEBOS: Correct indentation of WEBOS preprocessor check
bc0ed24915 CREDITS: Add credits for WebOS backend
a16e9c0920 WEBOS: Add PDK paths to LDFLAGS & INCLUDES; enable dynamic plugins support
c9da4a2785 GIT: Ignore /plugins directory
fbc58d21ff WEBOS: Disable opengl support; move --sysroot to LDFLAGS where it belongs


Commit: f8a73665d3c23e1b0c0176af76a1f5a8bf36befe
    https://github.com/scummvm/scummvm/commit/f8a73665d3c23e1b0c0176af76a1f5a8bf36befe
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:05:01-07:00

Commit Message:
WEBOS: Add build support for webos

Changed paths:
    configure



diff --git a/configure b/configure
index 63669bb..da3640a 100755
--- a/configure
+++ b/configure
@@ -698,6 +698,7 @@ Special configuration feature:
                                            ps2 for PlayStation 2
                                            psp for PlayStation Portable
                                            samsungtv for Samsung TV
+                                           webos for HP Palm WebOS
                                            wii for Nintendo Wii
                                            wince for Windows CE
 
@@ -1134,6 +1135,11 @@ samsungtv)
 	_host_cpu=arm
 	_host_alias=arm-linux-gnueabi
 	;;
+webos)
+	_host_os=webos
+	_host_cpu=arm
+	_host_alias=arm-none-linux-gnueabi
+	;;
 wii)
 	_host_os=wii
 	_host_cpu=ppc
@@ -1241,6 +1247,16 @@ psp)
 		exit 1
 	fi
 	;;
+webos)
+	if test -z "$WEBOS_SDK"; then
+		echo "Please set WEBOS_SDK in your environment. export WEBOS_SDK=<path to WebOS SDK>"
+		exit 1
+	fi
+	if test -z "$WEBOS_PDK"; then
+		echo "Please set WEBOS_PDK in your environment. export WEBOS_PDK=<path to WebOS PDK>"
+		exit 1
+	fi
+	;;
 *)
 	;;
 esac
@@ -1651,6 +1667,16 @@ case $_host_os in
 		LIBS="$LIBS -lnsl -lsocket"
 		_unix=yes
 		;;
+	webos)
+		CXXFLAGS="$CXXFLAGS --sysroot=$WEBOS_PDK/arm-gcc/sysroot"
+		CXXFLAGS="$CXXFLAGS -I$WEBOS_PDK/include/SDL"
+		LDFLAGS="$LDFLAGS -L$WEBOS_PDK/device/lib"
+		LDFLAGS="$LDFLAGS -Wl,--allow-shlib-undefined"
+		LIBS="$LIBS -lSDL -lpdl"
+		add_line_to_config_mk "WEBOS_SDK = $WEBOS_SDK"
+		_unix=yes
+		_seq_midi=no
+		;;
 	wii)
 		CXXFLAGS="$CXXFLAGS -Os -mrvl -mcpu=750 -meabi -mhard-float"
 		CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fmodulo-sched"


Commit: 72d206dc738b41379d468f9f256c3225e20425f0
    https://github.com/scummvm/scummvm/commit/72d206dc738b41379d468f9f256c3225e20425f0
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:05:07-07:00

Commit Message:
WEBOS: Add WEBOS define

Using SDL_INIT_VIDEO flag for WebOS because without it the application
won't start.

Changed paths:
    backends/platform/sdl/sdl.cpp
    configure



diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index bddb48c..d0036b4 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -213,6 +213,11 @@ void OSystem_SDL::initSDL() {
 		uint32 sdlFlags = 0;
 		if (ConfMan.hasKey("disable_sdl_parachute"))
 			sdlFlags |= SDL_INIT_NOPARACHUTE;
+		
+		#ifdef WEBOS
+		// WebOS needs this flag or otherwise the application won't start
+		sdlFlags |= SDL_INIT_VIDEO;
+		#endif
 
 		// Initialize SDL (SDL Subsystems are initiliazed in the corresponding sdl managers)
 		if (SDL_Init(sdlFlags) == -1)
diff --git a/configure b/configure
index da3640a..c732ecc 100755
--- a/configure
+++ b/configure
@@ -1670,6 +1670,7 @@ case $_host_os in
 	webos)
 		CXXFLAGS="$CXXFLAGS --sysroot=$WEBOS_PDK/arm-gcc/sysroot"
 		CXXFLAGS="$CXXFLAGS -I$WEBOS_PDK/include/SDL"
+		CXXFLAGS="$CXXFLAGS -DWEBOS"
 		LDFLAGS="$LDFLAGS -L$WEBOS_PDK/device/lib"
 		LDFLAGS="$LDFLAGS -Wl,--allow-shlib-undefined"
 		LIBS="$LIBS -lSDL -lpdl"


Commit: 7c5c6803abe774cd77dcc38dd4ede00e7eec76e4
    https://github.com/scummvm/scummvm/commit/7c5c6803abe774cd77dcc38dd4ede00e7eec76e4
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:05:17-07:00

Commit Message:
WEBOS: Add webos backend

IPK can be built with "make webosrelease".

Changed paths:
  A backends/platform/webos/webos.mk
  A dists/webos/mojo/appinfo.json
  A dists/webos/mojo/icon.png
  A dists/webos/mojo/package.properties
  A dists/webos/mojo/scummvmrc-default
  A dists/webos/mojo/start
    .gitignore
    configure



diff --git a/.gitignore b/.gitignore
index 07b6227..4973581 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,6 +19,7 @@ lib*.a
 /MT32_CONTROL.ROM
 /MT32_PCM.ROM
 /ScummVM.app
+/*.ipk
 /.project
 /.cproject
 
diff --git a/backends/platform/webos/webos.mk b/backends/platform/webos/webos.mk
new file mode 100644
index 0000000..6e8997c
--- /dev/null
+++ b/backends/platform/webos/webos.mk
@@ -0,0 +1,19 @@
+# WebOS specific build targets
+
+PATH_DIST = $(srcdir)/dists/webos
+PATH_RESOURCES = $(PATH_DIST)/mojo
+
+STAGING_DIR=STAGING/org.scummvm
+
+webosrelease:
+	rm -rf $(STAGING_DIR)
+	rm -f *.ipk
+	mkdir -p $(STAGING_DIR)
+	mkdir -p $(STAGING_DIR)/bin
+	mkdir -p $(STAGING_DIR)/lib
+	cp -f $(PATH_RESOURCES)/* $(STAGING_DIR)
+	cp -f scummvm $(STAGING_DIR)/bin
+	$(WEBOS_SDK)/bin/palm-package $(STAGING_DIR)
+	rm -rf STAGING
+
+.PHONY: webosrelease
diff --git a/configure b/configure
index c732ecc..1cec7db 100755
--- a/configure
+++ b/configure
@@ -655,7 +655,7 @@ Configuration:
   -h, --help              display this help and exit
   --backend=BACKEND       backend to build (android, dc, dingux, ds, gp2x, gph,
                           iphone, linuxmoto, maemo, n64, null, openpandora, ps2,
-                          psp, samsungtv, sdl, symbian, wii, wince) [sdl]
+                          psp, samsungtv, sdl, symbian, webos, wii, wince) [sdl]
 
 Installation directories:
   --prefix=PREFIX         install architecture-independent files in PREFIX
@@ -1669,11 +1669,8 @@ case $_host_os in
 		;;
 	webos)
 		CXXFLAGS="$CXXFLAGS --sysroot=$WEBOS_PDK/arm-gcc/sysroot"
-		CXXFLAGS="$CXXFLAGS -I$WEBOS_PDK/include/SDL"
-		CXXFLAGS="$CXXFLAGS -DWEBOS"
 		LDFLAGS="$LDFLAGS -L$WEBOS_PDK/device/lib"
 		LDFLAGS="$LDFLAGS -Wl,--allow-shlib-undefined"
-		LIBS="$LIBS -lSDL -lpdl"
 		add_line_to_config_mk "WEBOS_SDK = $WEBOS_SDK"
 		_unix=yes
 		_seq_midi=no
@@ -2056,6 +2053,21 @@ if test -n "$_host"; then
 			_mt32emu=no
 			_vkeybd=yes
 			;;
+		webos)
+			_unix=yes
+			_need_memalign=yes
+			add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
+			add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
+			add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
+			add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1'
+			add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1'
+			_backend="webos"
+			_port_mk="backends/platform/webos/webos.mk"
+			_build_scalers=no
+			_timidity=no
+			_mt32emu=no
+			_seq_midi=no
+			;;
 		wii)
 			_endian=big
 			_need_memalign=yes
@@ -2142,7 +2154,7 @@ fi
 # Enable 16bit support only for backends which support it
 #
 case $_backend in
-	android | dingux | dreamcast | gph | openpandora | psp | samsungtv | sdl | wii)
+	android | dingux | dreamcast | gph | openpandora | psp | samsungtv | sdl | webos | wii)
 		if test "$_16bit" = auto ; then
 			_16bit=yes
 		else
@@ -3118,6 +3130,12 @@ case $_backend in
 		LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`"
 		DEFINES="$DEFINES -DSDL_BACKEND"
 		;;
+	webos)
+		INCLUDES="$INCLUDES -I$WEBOS_PDK/include/SDL"
+		LIBS="$LIBS -lSDL -lpdl"
+		DEFINES="$DEFINES -DWEBOS -DSDL_BACKEND"
+		MODULES="$MODULES backends/platform/sdl"
+		;;
 	wii)
 		DEFINES="$DEFINES -D__WII__ -DGEKKO"
 		case $_host_os in
diff --git a/dists/webos/mojo/appinfo.json b/dists/webos/mojo/appinfo.json
new file mode 100644
index 0000000..1008dfe
--- /dev/null
+++ b/dists/webos/mojo/appinfo.json
@@ -0,0 +1,10 @@
+{
+	"id": "org.scummvm",
+	"version": "1.3.0001",
+	"vendor": "ScummVM Team",
+	"type": "pdk",
+	"main": "start",
+	"title": "ScummVM",
+	"icon": "icon.png",
+	"requiredMemory": 64
+}
diff --git a/dists/webos/mojo/icon.png b/dists/webos/mojo/icon.png
new file mode 100644
index 0000000..eb9d8e3
Binary files /dev/null and b/dists/webos/mojo/icon.png differ
diff --git a/dists/webos/mojo/package.properties b/dists/webos/mojo/package.properties
new file mode 100644
index 0000000..962e809
--- /dev/null
+++ b/dists/webos/mojo/package.properties
@@ -0,0 +1 @@
+filemode.755=start,bin/scummvm
diff --git a/dists/webos/mojo/scummvmrc-default b/dists/webos/mojo/scummvmrc-default
new file mode 100644
index 0000000..2961fb2
--- /dev/null
+++ b/dists/webos/mojo/scummvmrc-default
@@ -0,0 +1,36 @@
+[scummvm]
+mute=false 
+speech_volume=192
+native_mt32=false
+midi_gain=100
+talkspeed=60
+subtitles=true
+multi_midi=false
+fullscreen=true
+sfx_volume=192   
+music_volume=192
+autosave_period=300
+music_driver=auto
+opl_driver=auto 
+aspect_ratio=false
+versioninfo=1.0.0
+speech_mute=false
+enable_gs=false
+browser_lastpath=/media/internal/ScummVM/Games
+themepath=/media/internal/ScummVM/Themes
+savepath=/media/internal/ScummVM/Saves
+extrapath=/media/internal/ScummVM/Extras
+pluginspath=/media/internal/ScummVM/Plugins
+vkeybdpath=/media/cryptofs/apps/usr/palm/applications/org.scummvm/share/scummvm
+
+[keymapper]
+keymap_global_VIRT=C+k
+keymap_global_SKCT=A+ESCAPE
+keymap_global_REMP=AT
+keymap_global_MENU=A+FORWARD
+keymap_gui_CLOS=A+ESCAPE
+keymap_gui_CLIK=RETURN  
+keymap_global_PAUS=SPACE
+keymap_global_SKLI=PERIOD
+keymap_gui_VIRT=C+k
+keymap_gui_REMP=AT 
diff --git a/dists/webos/mojo/start b/dists/webos/mojo/start
new file mode 100755
index 0000000..5a338e0
--- /dev/null
+++ b/dists/webos/mojo/start
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# Get app directory
+APPDIR=$(readlink -f $(dirname $0))
+
+# Create the initial ScummVM directory structure
+mkdir -p /media/internal/ScummVM/Games
+mkdir -p /media/internal/ScummVM/Saves
+mkdir -p /media/internal/ScummVM/Screenshots
+mkdir -p /media/internal/ScummVM/Themes
+mkdir -p /media/internal/ScummVM/Extras
+mkdir -p /media/internal/ScummVM/Plugins
+
+# Install default configuration file if not already present
+if [ ! -f $APPDIR/scummvmrc ]
+then
+    cp $APPDIR/scummvmrc-default $APPDIR/scummvmrc
+fi
+
+# Change into the screenshots directory so screenshots are saved there
+cd /media/internal/ScummVM/Screenshots
+
+# Set library path so the app finds its custom shared libraries
+export LD_LIBRARY_PATH=$APPDIR/lib
+
+# Run the game
+exec $APPDIR/bin/scummvm -c $APPDIR/scummvmrc


Commit: b17f7d20c28eda883b8c21ad3fedc6619ee04d5d
    https://github.com/scummvm/scummvm/commit/b17f7d20c28eda883b8c21ad3fedc6619ee04d5d
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:05:28-07:00

Commit Message:
WEBOS: Strip binary before packaging it

Changed paths:
    backends/platform/webos/webos.mk



diff --git a/backends/platform/webos/webos.mk b/backends/platform/webos/webos.mk
index 6e8997c..77dc7a4 100644
--- a/backends/platform/webos/webos.mk
+++ b/backends/platform/webos/webos.mk
@@ -13,6 +13,7 @@ webosrelease:
 	mkdir -p $(STAGING_DIR)/lib
 	cp -f $(PATH_RESOURCES)/* $(STAGING_DIR)
 	cp -f scummvm $(STAGING_DIR)/bin
+	$(WEBOS_PDK)/arm-gcc/bin/arm-none-linux-gnueabi-strip $(STAGING_DIR)/bin/scummvm
 	$(WEBOS_SDK)/bin/palm-package $(STAGING_DIR)
 	rm -rf STAGING
 


Commit: a4e757834e1ea227c207072868ca732f9872ed59
    https://github.com/scummvm/scummvm/commit/a4e757834e1ea227c207072868ca732f9872ed59
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:05:35-07:00

Commit Message:
WEBOS: Create webos backend with custom events

Currently only contains test code.

Changed paths:
  A backends/events/webossdl/webossdl-events.cpp
  A backends/events/webossdl/webossdl-events.h
  A backends/platform/webos/main.cpp
  A backends/platform/webos/module.mk
  A backends/platform/webos/webos.cpp
  A backends/platform/webos/webos.h
    backends/module.mk
    backends/platform/sdl/posix/posix-main.cpp
    configure



diff --git a/backends/events/webossdl/webossdl-events.cpp b/backends/events/webossdl/webossdl-events.cpp
new file mode 100644
index 0000000..7802196
--- /dev/null
+++ b/backends/events/webossdl/webossdl-events.cpp
@@ -0,0 +1,55 @@
+/* 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 "common/scummsys.h"
+#include <stdio.h>
+
+#ifdef WEBOS
+
+#include "backends/events/webossdl/webossdl-events.h"
+
+bool WebOSSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
+	switch (ev.type) {
+		case SDL_KEYDOWN:{
+			if (ev.key.keysym.sym == 231) {
+				printf("metatap down\n");
+				return true;
+			}
+			break;
+		}
+		case SDL_KEYUP: {
+			if (ev.key.keysym.sym == 231) {
+				printf("metatap up\n");
+				return true;
+			}
+			break;
+		}
+	}
+
+	// Invoke parent implementation of this method
+	return SdlEventSource::remapKey(ev, event);
+}
+
+#endif
diff --git a/backends/events/webossdl/webossdl-events.h b/backends/events/webossdl/webossdl-events.h
new file mode 100644
index 0000000..77921f6
--- /dev/null
+++ b/backends/events/webossdl/webossdl-events.h
@@ -0,0 +1,39 @@
+/* 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$
+ *
+ */
+
+#if !defined(BACKEND_EVENTS_SDL_WEBOS_H) && !defined(DISABLE_DEFAULT_EVENTMANAGER)
+#define BACKEND_EVENTS_SDL_WEBOS_H
+
+#include "backends/events/sdl/sdl-events.h"
+
+/**
+ * SDL events manager for WebOS
+ */
+class WebOSSdlEventSource : public SdlEventSource {
+protected:
+	virtual bool remapKey(SDL_Event &ev, Common::Event &event);
+};
+
+#endif
diff --git a/backends/module.mk b/backends/module.mk
index c562aea..426409a 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -14,6 +14,7 @@ MODULE_OBJS := \
 	events/samsungtvsdl/samsungtvsdl-events.o \
 	events/sdl/sdl-events.o \
 	events/symbiansdl/symbiansdl-events.o \
+	events/webossdl/webossdl-events.o \
 	events/wincesdl/wincesdl-events.o \
 	fs/abstract-fs.o \
 	fs/stdiostream.o \
diff --git a/backends/platform/sdl/posix/posix-main.cpp b/backends/platform/sdl/posix/posix-main.cpp
index 72777e1..9e778ab 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 0000000..fa10613
--- /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 0000000..fe4ec1e
--- /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 0000000..597da00
--- /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 0000000..be35547
--- /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
diff --git a/configure b/configure
index 1cec7db..1debc94 100755
--- a/configure
+++ b/configure
@@ -2067,6 +2067,7 @@ if test -n "$_host"; then
 			_timidity=no
 			_mt32emu=no
 			_seq_midi=no
+			_vkeybd=yes
 			;;
 		wii)
 			_endian=big
@@ -3133,7 +3134,7 @@ case $_backend in
 	webos)
 		INCLUDES="$INCLUDES -I$WEBOS_PDK/include/SDL"
 		LIBS="$LIBS -lSDL -lpdl"
-		DEFINES="$DEFINES -DWEBOS -DSDL_BACKEND"
+		DEFINES="$DEFINES -DSDL_BACKEND -DWEBOS"
 		MODULES="$MODULES backends/platform/sdl"
 		;;
 	wii)


Commit: 48dbbdcd74e4e0f8b21d77fb9850d348a082c03d
    https://github.com/scummvm/scummvm/commit/48dbbdcd74e4e0f8b21d77fb9850d348a082c03d
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:05:48-07:00

Commit Message:
COMMON: Fix usage of wrong variable when keymapper is active

Changed paths:
    common/config-manager.cpp



diff --git a/common/config-manager.cpp b/common/config-manager.cpp
index c8c0999..77c918d 100644
--- a/common/config-manager.cpp
+++ b/common/config-manager.cpp
@@ -120,7 +120,7 @@ void ConfigManager::addDomain(const Common::String &domainName, const ConfigMana
 	if (domainName == kApplicationDomain) {
 		_appDomain = domain;
 #ifdef ENABLE_KEYMAPPER
-	} else if (domain == kKeymapperDomain) {
+	} else if (domainName == kKeymapperDomain) {
 		_keymapperDomain = domain;
 #endif
 	} else if (domain.contains("gameid")) {


Commit: aa79a2634d94ad98e1e32aaa923c2cd9fbe99893
    https://github.com/scummvm/scummvm/commit/aa79a2634d94ad98e1e32aaa923c2cd9fbe99893
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:05:53-07:00

Commit Message:
WEBOS: Enable keymapper, implement FORWARD key and right+middle button clicks

Changed paths:
  A backends/platform/webos/hardwarekeys.cpp
  A backends/platform/webos/keyboard.h
    backends/events/webossdl/webossdl-events.cpp
    backends/events/webossdl/webossdl-events.h
    backends/platform/webos/main.cpp
    backends/platform/webos/module.mk
    backends/platform/webos/webos.h
    configure



diff --git a/backends/events/webossdl/webossdl-events.cpp b/backends/events/webossdl/webossdl-events.cpp
index 7802196..e1db808 100644
--- a/backends/events/webossdl/webossdl-events.cpp
+++ b/backends/events/webossdl/webossdl-events.cpp
@@ -30,26 +30,84 @@
 
 #include "backends/events/webossdl/webossdl-events.h"
 
+static int mouseButton = 0;
+
+// WebOS devices only have a shift key and a ctrl key. There is also an alt
+// key (the orange key) but this is already processed by WebOS to change the 
+// mode of the keys so ScummVM must not use this key as a modifier.
+void WebOSSdlEventSource::SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &event) {
+        event.kbd.flags = 0;
+
+        if (mod & KMOD_SHIFT)
+                event.kbd.flags |= Common::KBD_SHIFT;
+        if (mod & KMOD_CTRL)
+                event.kbd.flags |= Common::KBD_CTRL;
+}
+
+// Capture Shift and Control to decide the active mouse button
 bool WebOSSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
+	int sym = ev.key.keysym.sym;
 	switch (ev.type) {
-		case SDL_KEYDOWN:{
-			if (ev.key.keysym.sym == 231) {
-				printf("metatap down\n");
+		case SDL_KEYDOWN:
+			if (sym == 304) {
+				mouseButton = 1;
+				return true;
+			}
+			else if (sym == 305) {
+				mouseButton = 2;
 				return true;
 			}
 			break;
-		}
-		case SDL_KEYUP: {
-			if (ev.key.keysym.sym == 231) {
-				printf("metatap up\n");
+		case SDL_KEYUP:
+			if (sym == 304 || sym == 305) {
+				mouseButton = 0;
 				return true;
 			}
 			break;
-		}
 	}
 
 	// Invoke parent implementation of this method
 	return SdlEventSource::remapKey(ev, event);
 }
 
+bool WebOSSdlEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &event) {
+	// Simulate right mouse button
+	if (ev.button.button == SDL_BUTTON_LEFT && mouseButton == 1) {
+		event.type = Common::EVENT_RBUTTONDOWN;
+		fillMouseEvent(event, ev.button.x, ev.button.y);
+		printf("rbutton down\n");
+		return true;
+	}
+
+	// Simulate middle mouse button
+	if (ev.button.button == SDL_BUTTON_LEFT && mouseButton == 2) {
+		event.type = Common::EVENT_MBUTTONDOWN;
+		fillMouseEvent(event, ev.button.x, ev.button.y);
+		printf("rbutton down\n");
+		return true;
+	}
+
+	// Invoke parent implementation of this method
+	return SdlEventSource::handleMouseButtonDown(ev, event);
+}
+
+bool WebOSSdlEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &event) {
+	// Simulate right mouse button
+	if (ev.button.button == SDL_BUTTON_LEFT && mouseButton == 1) {
+		event.type = Common::EVENT_RBUTTONUP;
+		fillMouseEvent(event, ev.button.x, ev.button.y);
+		return true;
+	}
+
+	// Simulate right mouse button
+	if (ev.button.button == SDL_BUTTON_LEFT && mouseButton == 2) {
+		event.type = Common::EVENT_MBUTTONUP;
+		fillMouseEvent(event, ev.button.x, ev.button.y);
+		return true;
+	}
+
+	// Invoke parent implementation of this method
+	return SdlEventSource::handleMouseButtonUp(ev, event);
+}
+
 #endif
diff --git a/backends/events/webossdl/webossdl-events.h b/backends/events/webossdl/webossdl-events.h
index 77921f6..fc37fb8 100644
--- a/backends/events/webossdl/webossdl-events.h
+++ b/backends/events/webossdl/webossdl-events.h
@@ -33,7 +33,10 @@
  */
 class WebOSSdlEventSource : public SdlEventSource {
 protected:
+	virtual void SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &event);
 	virtual bool remapKey(SDL_Event &ev, Common::Event &event);
+	virtual bool handleMouseButtonDown(SDL_Event &ev, Common::Event &event);
+	virtual bool handleMouseButtonUp(SDL_Event &ev, Common::Event &event);
 };
 
 #endif
diff --git a/backends/platform/webos/hardwarekeys.cpp b/backends/platform/webos/hardwarekeys.cpp
new file mode 100644
index 0000000..d8869a4
--- /dev/null
+++ b/backends/platform/webos/hardwarekeys.cpp
@@ -0,0 +1,164 @@
+/* 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/platform/webos/keyboard.h"
+#include "backends/keymapper/keymapper.h"
+#include "common/keyboard.h"
+
+#ifdef ENABLE_KEYMAPPER
+
+using namespace Common;
+
+struct Key {
+	const char *hwId;
+	KeyCode keycode;
+	uint16 ascii;
+	const char *desc;
+	KeyType preferredAction;
+	bool shiftable;
+};
+
+static const Key keys[] = {
+	{"BACKSPACE", KEYCODE_BACKSPACE, ASCII_BACKSPACE, "Backspace", kActionKeyType, false},
+	{"RETURN", KEYCODE_RETURN, ASCII_RETURN, "Return", kActionKeyType, false},
+	{"ESCAPE", KEYCODE_ESCAPE, ASCII_ESCAPE, "Esc", kStartKeyType, false},
+	{"SPACE", KEYCODE_SPACE, ASCII_SPACE, "Space", kActionKeyType, false},
+	{"EXCLAIM", KEYCODE_EXCLAIM, '!', "!", kActionKeyType, false},
+	{"QUOTEDBL", KEYCODE_QUOTEDBL, '"', "\"", kActionKeyType, false},
+	{"HASH", KEYCODE_HASH, '#', "#", kActionKeyType, false},
+	{"DOLLAR", KEYCODE_DOLLAR, '$', "$", kActionKeyType, false},
+	{"AMPERSAND", KEYCODE_AMPERSAND, '&', "&", kActionKeyType, false},
+	{"QUOTE", KEYCODE_QUOTE, '\'', "'", kActionKeyType, false},
+	{"LEFTPAREN", KEYCODE_LEFTPAREN, '(', "(", kActionKeyType, false},
+	{"RIGHTPAREN", KEYCODE_RIGHTPAREN, ')', ")", kActionKeyType, false},
+	{"ASTERISK", KEYCODE_ASTERISK, '*', "*", kActionKeyType, false},
+	{"PLUS", KEYCODE_PLUS, '+', "+", kActionKeyType, false},
+	{"COMMA", KEYCODE_COMMA, ',', ",", kActionKeyType, false},
+	{"MINUS", KEYCODE_MINUS, '-', "-", kActionKeyType, false},
+	{"PERIOD", KEYCODE_PERIOD, '.', ".", kActionKeyType, false},
+	{"SLASH", KEYCODE_SLASH, '/', "/", kActionKeyType, false},
+	{"0", KEYCODE_0, '0', "0", kActionKeyType, false},
+	{"1", KEYCODE_1, '1', "1", kActionKeyType, false},
+	{"2", KEYCODE_2, '2', "2", kActionKeyType, false},
+	{"3", KEYCODE_3, '3', "3", kActionKeyType, false},
+	{"4", KEYCODE_4, '4', "4", kActionKeyType, false},
+	{"5", KEYCODE_5, '5', "5", kActionKeyType, false},
+	{"6", KEYCODE_6, '6', "6", kActionKeyType, false},
+	{"7", KEYCODE_7, '7', "7", kActionKeyType, false},
+	{"8", KEYCODE_8, '8', "8", kActionKeyType, false},
+	{"9", KEYCODE_9, '9', "9", kActionKeyType, false},
+	{"COLON", KEYCODE_COLON, ':', ":", kActionKeyType, false},
+	{"SEMICOLON", KEYCODE_SEMICOLON, ';', ";", kActionKeyType, false},
+	{"EQUALS", KEYCODE_EQUALS, '=', "=", kActionKeyType, false},
+	{"QUESTION", KEYCODE_QUESTION, '?', "?", kActionKeyType, false},
+	{"AT", KEYCODE_AT, '@', "@", kActionKeyType, false},
+
+	{"UNDERSCORE", KEYCODE_UNDERSCORE, '_', "_", kActionKeyType, false},
+	{"a", KEYCODE_a, 'a', "a", kActionKeyType, true},
+	{"b", KEYCODE_b, 'b', "b", kActionKeyType, true},
+	{"c", KEYCODE_c, 'c', "c", kActionKeyType, true},
+	{"d", KEYCODE_d, 'd', "d", kActionKeyType, true},
+	{"e", KEYCODE_e, 'e', "e", kActionKeyType, true},
+	{"f", KEYCODE_f, 'f', "f", kActionKeyType, true},
+	{"g", KEYCODE_g, 'g', "g", kActionKeyType, true},
+	{"h", KEYCODE_h, 'h', "h", kActionKeyType, true},
+	{"i", KEYCODE_i, 'i', "i", kActionKeyType, true},
+	{"j", KEYCODE_j, 'j', "j", kActionKeyType, true},
+	{"k", KEYCODE_k, 'k', "k", kActionKeyType, true},
+	{"l", KEYCODE_l, 'l', "l", kActionKeyType, true},
+	{"m", KEYCODE_m, 'm', "m", kActionKeyType, true},
+	{"n", KEYCODE_n, 'n', "n", kActionKeyType, true},
+	{"o", KEYCODE_o, 'o', "o", kActionKeyType, true},
+	{"p", KEYCODE_p, 'p', "p", kActionKeyType, true},
+	{"q", KEYCODE_q, 'q', "q", kActionKeyType, true},
+	{"r", KEYCODE_r, 'r', "r", kActionKeyType, true},
+	{"s", KEYCODE_s, 's', "s", kActionKeyType, true},
+	{"t", KEYCODE_t, 't', "t", kActionKeyType, true},
+	{"u", KEYCODE_u, 'u', "u", kActionKeyType, true},
+	{"v", KEYCODE_v, 'v', "v", kActionKeyType, true},
+	{"w", KEYCODE_w, 'w', "w", kActionKeyType, true},
+	{"x", KEYCODE_x, 'x', "x", kActionKeyType, true},
+	{"y", KEYCODE_y, 'y', "y", kActionKeyType, true},
+	{"z", KEYCODE_z, 'z', "z", kActionKeyType, true},
+
+	// Miscellaneous function keys
+	{ "FORWARD", (KeyCode) KEYCODE_FORWARD, ASCII_FORWARD, "Forward", kActionKeyType, false },
+
+	{0, KEYCODE_INVALID, 0, 0, kGenericKeyType, false}
+};
+
+struct Mod {
+	byte flag;
+	const char *id;
+	const char *desc;
+	bool shiftable;
+};
+
+static const Mod modifiers[] = {
+	{ 0, "", "", false },
+	{ KBD_CTRL, "C+", "Ctrl+", false },
+	{ KBD_SHIFT, "", "", true },
+	{ KBD_SHIFT | KBD_CTRL, "S+C+", "Shift+Ctrl+", true },
+	{ 0, 0, 0, false }
+};
+#endif
+
+Common::HardwareKeySet *OSystem_SDL_WebOS::getHardwareKeySet() {
+#ifdef ENABLE_KEYMAPPER
+
+	HardwareKeySet *keySet = new HardwareKeySet();
+	const Key *key;
+	const Mod *mod;
+	char fullKeyId[50];
+	char fullKeyDesc[100];
+	uint16 ascii;
+
+	for (mod = modifiers; mod->id; mod++) {
+		for (key = keys; key->hwId; key++) {
+			ascii = key->ascii;
+
+			if (mod->shiftable && key->shiftable) {
+				snprintf(fullKeyId, 50, "%s%c", mod->id, toupper(key->hwId[0]));
+				snprintf(fullKeyDesc, 100, "%s%c", mod->desc, toupper(key->desc[0]));
+				ascii = toupper(key->ascii);
+			} else if (mod->shiftable) {
+				snprintf(fullKeyId, 50, "S+%s%s", mod->id, key->hwId);
+				snprintf(fullKeyDesc, 100, "Shift+%s%s", mod->desc, key->desc);
+			} else {
+				snprintf(fullKeyId, 50, "%s%s", mod->id, key->hwId);
+				snprintf(fullKeyDesc, 100, "%s%s", mod->desc, key->desc);
+			}
+
+			keySet->addHardwareKey(new HardwareKey(fullKeyId, KeyState(key->keycode, ascii, mod->flag), fullKeyDesc, key->preferredAction ));
+		}
+	}
+
+	return keySet;
+
+#else
+	return 0;
+#endif
+}
diff --git a/backends/platform/webos/keyboard.h b/backends/platform/webos/keyboard.h
new file mode 100644
index 0000000..816996a
--- /dev/null
+++ b/backends/platform/webos/keyboard.h
@@ -0,0 +1,37 @@
+/* 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 WEBOS_KEYBOARD_H
+#define WEBOS_KEYBOARD_H
+
+enum {
+	KEYCODE_FORWARD = 229
+};
+
+enum {
+	ASCII_FORWARD = 229
+};
+
+#endif
diff --git a/backends/platform/webos/main.cpp b/backends/platform/webos/main.cpp
index fa10613..bbf55c6 100644
--- a/backends/platform/webos/main.cpp
+++ b/backends/platform/webos/main.cpp
@@ -32,7 +32,6 @@
 #include <unistd.h>
 
 int main(int argc, char* argv[]) {
-
 	g_system = new OSystem_SDL_WebOS();
 	assert(g_system);
 
diff --git a/backends/platform/webos/module.mk b/backends/platform/webos/module.mk
index fe4ec1e..6f68b98 100644
--- a/backends/platform/webos/module.mk
+++ b/backends/platform/webos/module.mk
@@ -2,7 +2,8 @@ MODULE := backends/platform/webos
 
 MODULE_OBJS := \
 	main.o \
-	webos.o
+	webos.o \
+	hardwarekeys.o
 
 # We don't use rules.mk but rather manually update OBJS and MODULE_DIRS.
 MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
diff --git a/backends/platform/webos/webos.h b/backends/platform/webos/webos.h
index be35547..1cdba70 100644
--- a/backends/platform/webos/webos.h
+++ b/backends/platform/webos/webos.h
@@ -26,6 +26,7 @@
 #ifndef PLATFORM_SDL_WEBOS_H
 #define PLATFORM_SDL_WEBOS_H
 
+#include "common/system.h"
 #include "backends/platform/sdl/posix/posix.h"
 
 class OSystem_SDL_WebOS : public OSystem_POSIX {
@@ -33,6 +34,7 @@ public:
 	OSystem_SDL_WebOS();
 
 	virtual void initBackend();
+	virtual Common::HardwareKeySet *getHardwareKeySet();
 };
 
 #endif
diff --git a/configure b/configure
index 1debc94..02208a3 100755
--- a/configure
+++ b/configure
@@ -2068,6 +2068,7 @@ if test -n "$_host"; then
 			_mt32emu=no
 			_seq_midi=no
 			_vkeybd=yes
+			_keymapper=yes
 			;;
 		wii)
 			_endian=big
@@ -3132,7 +3133,7 @@ case $_backend in
 		DEFINES="$DEFINES -DSDL_BACKEND"
 		;;
 	webos)
-		INCLUDES="$INCLUDES -I$WEBOS_PDK/include/SDL"
+		INCLUDES="$INCLUDES -I$WEBOS_PDK/include -I$WEBOS_PDK/include/SDL"
 		LIBS="$LIBS -lSDL -lpdl"
 		DEFINES="$DEFINES -DSDL_BACKEND -DWEBOS"
 		MODULES="$MODULES backends/platform/sdl"


Commit: ba97f8daf32027e0d0f0884615a69fa4f5133796
    https://github.com/scummvm/scummvm/commit/ba97f8daf32027e0d0f0884615a69fa4f5133796
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:08:50-07:00

Commit Message:
WEBOS: Correct package name, fix default key mapping

Changed paths:
    dists/webos/mojo/appinfo.json
    dists/webos/mojo/scummvmrc-default



diff --git a/dists/webos/mojo/appinfo.json b/dists/webos/mojo/appinfo.json
index 1008dfe..00762c9 100644
--- a/dists/webos/mojo/appinfo.json
+++ b/dists/webos/mojo/appinfo.json
@@ -1,5 +1,5 @@
 {
-	"id": "org.scummvm",
+	"id": "org.scummvm.scummvm",
 	"version": "1.3.0001",
 	"vendor": "ScummVM Team",
 	"type": "pdk",
diff --git a/dists/webos/mojo/scummvmrc-default b/dists/webos/mojo/scummvmrc-default
index 2961fb2..e71f0fb 100644
--- a/dists/webos/mojo/scummvmrc-default
+++ b/dists/webos/mojo/scummvmrc-default
@@ -24,13 +24,13 @@ pluginspath=/media/internal/ScummVM/Plugins
 vkeybdpath=/media/cryptofs/apps/usr/palm/applications/org.scummvm/share/scummvm
 
 [keymapper]
-keymap_global_VIRT=C+k
-keymap_global_SKCT=A+ESCAPE
-keymap_global_REMP=AT
-keymap_global_MENU=A+FORWARD
-keymap_gui_CLOS=A+ESCAPE
-keymap_gui_CLIK=RETURN  
-keymap_global_PAUS=SPACE
-keymap_global_SKLI=PERIOD
-keymap_gui_VIRT=C+k
-keymap_gui_REMP=AT 
+keymap_global_MEN=FORWARD
+keymap_gui_VIR=C+k
+keymap_global_SKL=PERIOD
+keymap_global_SKC=ESCAPE
+keymap_gui_REM=AT
+keymap_global_PAU=SPACE
+keymap_gui_CLO=ESCAPE
+keymap_gui_CLI=RETURN
+keymap_global_VIR=C+k
+keymap_global_REM=AT


Commit: a899ec286f1726781ba1ed772fcda4dab81c40c8
    https://github.com/scummvm/scummvm/commit/a899ec286f1726781ba1ed772fcda4dab81c40c8
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:08:53-07:00

Commit Message:
WEBOS: Correct package directory name

Changed paths:
    backends/platform/webos/webos.mk



diff --git a/backends/platform/webos/webos.mk b/backends/platform/webos/webos.mk
index 77dc7a4..f26dc02 100644
--- a/backends/platform/webos/webos.mk
+++ b/backends/platform/webos/webos.mk
@@ -3,7 +3,7 @@
 PATH_DIST = $(srcdir)/dists/webos
 PATH_RESOURCES = $(PATH_DIST)/mojo
 
-STAGING_DIR=STAGING/org.scummvm
+STAGING_DIR=STAGING/org.scummvm.scummvm
 
 webosrelease:
 	rm -rf $(STAGING_DIR)


Commit: 2160ecfe3a81eb9ab4fff9b5ac1b2c96200d3a07
    https://github.com/scummvm/scummvm/commit/2160ecfe3a81eb9ab4fff9b5ac1b2c96200d3a07
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:11:16-07:00

Commit Message:
WEBOS: Disable vkeybd, fix more directory references with wrong package name

The vkeybd XML can't be read for some reason.

Changed paths:
    backends/platform/webos/webos.cpp
    backends/platform/webos/webos.mk
    configure
    dists/webos/mojo/scummvmrc-default
    dists/webos/mojo/start



diff --git a/backends/platform/webos/webos.cpp b/backends/platform/webos/webos.cpp
index 597da00..34d6f68 100644
--- a/backends/platform/webos/webos.cpp
+++ b/backends/platform/webos/webos.cpp
@@ -30,7 +30,7 @@
 
 OSystem_SDL_WebOS::OSystem_SDL_WebOS()
 	:
-	OSystem_POSIX("/media/cryptofs/apps/usr/palm/applications/org.scummvm/scummvmrc") {
+	OSystem_POSIX("/media/cryptofs/apps/usr/palm/applications/org.scummvm.scummvm/scummvmrc") {
 }
 
 void OSystem_SDL_WebOS::initBackend() {
diff --git a/backends/platform/webos/webos.mk b/backends/platform/webos/webos.mk
index f26dc02..e567b38 100644
--- a/backends/platform/webos/webos.mk
+++ b/backends/platform/webos/webos.mk
@@ -1,7 +1,7 @@
 # WebOS specific build targets
 
 PATH_DIST = $(srcdir)/dists/webos
-PATH_RESOURCES = $(PATH_DIST)/mojo
+PATH_MOJO = $(PATH_DIST)/mojo
 
 STAGING_DIR=STAGING/org.scummvm.scummvm
 
@@ -11,7 +11,10 @@ webosrelease:
 	mkdir -p $(STAGING_DIR)
 	mkdir -p $(STAGING_DIR)/bin
 	mkdir -p $(STAGING_DIR)/lib
-	cp -f $(PATH_RESOURCES)/* $(STAGING_DIR)
+	mkdir -p $(STAGING_DIR)/share/scummvm
+	cp -f $(PATH_MOJO)/* $(STAGING_DIR)
+	cp -f gui/themes/translations.dat $(STAGING_DIR)/share/scummvm
+	cp -f gui/themes/scummmodern.zip $(STAGING_DIR)/share/scummvm
 	cp -f scummvm $(STAGING_DIR)/bin
 	$(WEBOS_PDK)/arm-gcc/bin/arm-none-linux-gnueabi-strip $(STAGING_DIR)/bin/scummvm
 	$(WEBOS_SDK)/bin/palm-package $(STAGING_DIR)
diff --git a/configure b/configure
index 02208a3..feae65e 100755
--- a/configure
+++ b/configure
@@ -2067,7 +2067,7 @@ if test -n "$_host"; then
 			_timidity=no
 			_mt32emu=no
 			_seq_midi=no
-			_vkeybd=yes
+			_vkeybd=no
 			_keymapper=yes
 			;;
 		wii)
diff --git a/dists/webos/mojo/scummvmrc-default b/dists/webos/mojo/scummvmrc-default
index e71f0fb..d29a0fc 100644
--- a/dists/webos/mojo/scummvmrc-default
+++ b/dists/webos/mojo/scummvmrc-default
@@ -1,4 +1,5 @@
 [scummvm]
+gui_theme=scummmodern
 mute=false 
 speech_volume=192
 native_mt32=false
@@ -13,7 +14,6 @@ autosave_period=300
 music_driver=auto
 opl_driver=auto 
 aspect_ratio=false
-versioninfo=1.0.0
 speech_mute=false
 enable_gs=false
 browser_lastpath=/media/internal/ScummVM/Games
@@ -21,7 +21,7 @@ themepath=/media/internal/ScummVM/Themes
 savepath=/media/internal/ScummVM/Saves
 extrapath=/media/internal/ScummVM/Extras
 pluginspath=/media/internal/ScummVM/Plugins
-vkeybdpath=/media/cryptofs/apps/usr/palm/applications/org.scummvm/share/scummvm
+vkeybdpath=/media/cryptofs/apps/usr/palm/applications/org.scummvm.scummvm/share/scummvm
 
 [keymapper]
 keymap_global_MEN=FORWARD
diff --git a/dists/webos/mojo/start b/dists/webos/mojo/start
index 5a338e0..55a7999 100755
--- a/dists/webos/mojo/start
+++ b/dists/webos/mojo/start
@@ -17,6 +17,9 @@ then
     cp $APPDIR/scummvmrc-default $APPDIR/scummvmrc
 fi
 
+# Copy themes to theme directory
+cp -f $APPDIR/share/scummvm/*.zip /media/internal/ScummVM/Themes
+
 # Change into the screenshots directory so screenshots are saved there
 cd /media/internal/ScummVM/Screenshots
 


Commit: e5dab6672c673d8827d5e471d98074220ff6b75c
    https://github.com/scummvm/scummvm/commit/e5dab6672c673d8827d5e471d98074220ff6b75c
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:11:16-07:00

Commit Message:
GIT: Add Eclipse .settings directory to gitignore

Changed paths:
    .gitignore



diff --git a/.gitignore b/.gitignore
index 4973581..5e1ff61 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,6 +22,7 @@ lib*.a
 /*.ipk
 /.project
 /.cproject
+/.settings
 
 /backends/platform/dc/gui
 /backends/platform/dc/graphics


Commit: 6c94353eff3aeee9c985d22b311959d1c5751b0e
    https://github.com/scummvm/scummvm/commit/6c94353eff3aeee9c985d22b311959d1c5751b0e
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:11:17-07:00

Commit Message:
WEBOS: Complete rewrite of key/mouse events handling

Touchscreen is now always used like a touch pad.

Changed paths:
  R backends/platform/webos/hardwarekeys.cpp
  R backends/platform/webos/keyboard.h
    backends/events/webossdl/webossdl-events.cpp
    backends/events/webossdl/webossdl-events.h
    backends/platform/webos/module.mk
    backends/platform/webos/webos.cpp



diff --git a/backends/events/webossdl/webossdl-events.cpp b/backends/events/webossdl/webossdl-events.cpp
index e1db808..7685e71 100644
--- a/backends/events/webossdl/webossdl-events.cpp
+++ b/backends/events/webossdl/webossdl-events.cpp
@@ -24,90 +24,218 @@
  */
 
 #include "common/scummsys.h"
-#include <stdio.h>
+#include "sys/time.h"
+#include "time.h"
 
 #ifdef WEBOS
 
 #include "backends/events/webossdl/webossdl-events.h"
+#include "gui/message.h"
 
-static int mouseButton = 0;
+// Inidicates if gesture area is pressed down or not.
+static bool gestureDown = false;
 
-// WebOS devices only have a shift key and a ctrl key. There is also an alt
-// key (the orange key) but this is already processed by WebOS to change the 
-// mode of the keys so ScummVM must not use this key as a modifier.
-void WebOSSdlEventSource::SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &event) {
-        event.kbd.flags = 0;
+// The timestamp when gesture area was pressed down.
+static int gestureDownTime = 0;
 
-        if (mod & KMOD_SHIFT)
-                event.kbd.flags |= Common::KBD_SHIFT;
-        if (mod & KMOD_CTRL)
-                event.kbd.flags |= Common::KBD_CTRL;
-}
+// The timestamp when screen was pressed down.
+static int screenDownTime = 0;
 
-// Capture Shift and Control to decide the active mouse button
-bool WebOSSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
-	int sym = ev.key.keysym.sym;
-	switch (ev.type) {
-		case SDL_KEYDOWN:
-			if (sym == 304) {
-				mouseButton = 1;
-				return true;
-			}
-			else if (sym == 305) {
-				mouseButton = 2;
-				return true;
-			}
-			break;
-		case SDL_KEYUP:
-			if (sym == 304 || sym == 305) {
-				mouseButton = 0;
-				return true;
-			}
-			break;
-	}
+// The timestamp when a possible drag operation was triggered.
+static int dragStartTime = 0;
+
+// The index of the motion pointer.
+static int motionPtrIndex = -1;
+
+// The maximum horizontal motion during dragging (For tap recognition).
+static int dragDiffX = 0;
+
+// The maximum vertical motion during dragging (For tap recognition).
+static int dragDiffY = 0;
+
+// Indicates if we are in drag mode.
+static bool dragging = false;
+
+// The current mouse position on the screen.
+static int curX = 0, curY = 0;
+
+// The time (seconds after 1/1/1970) when program started.
+static time_t programStartTime = time(0);
 
-	// Invoke parent implementation of this method
-	return SdlEventSource::remapKey(ev, event);
+/**
+ * Returns the number of passed milliseconds since program start.
+ *
+ * @return The number of passed milliseconds.
+ */
+static time_t getMillis()
+{
+   struct timeval tv;
+   gettimeofday(&tv, NULL);
+   return (time(0) - programStartTime) * 1000 + tv.tv_usec / 1000;
 }
 
-bool WebOSSdlEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &event) {
-	// Simulate right mouse button
-	if (ev.button.button == SDL_BUTTON_LEFT && mouseButton == 1) {
-		event.type = Common::EVENT_RBUTTONDOWN;
-		fillMouseEvent(event, ev.button.x, ev.button.y);
-		printf("rbutton down\n");
+/**
+ * WebOS devices only have a Shift key and a CTRL key. There is also an Alt
+ * key (the orange key) but this is already processed by WebOS to change the
+ * mode of the keys so ScummVM must not use this key as a modifier. Instead
+ * pressing down the gesture area is used as Alt key.
+ *
+ * @param mod   The pressed key modifier as detected by SDL.
+ * @param event The ScummVM event to setup.
+ */
+void WebOSSdlEventSource::SDLModToOSystemKeyFlags(SDLMod mod,
+		Common::Event &event) {
+	event.kbd.flags = 0;
+
+	if (mod & KMOD_SHIFT)
+		event.kbd.flags |= Common::KBD_SHIFT;
+	if (mod & KMOD_CTRL)
+		event.kbd.flags |= Common::KBD_CTRL;
+	if (gestureDown)
+		event.kbd.flags |= Common::KBD_ALT;
+}
+
+/**
+ * Before calling the original SDL implementation this method checks if the
+ * gesture area is pressed down.
+ *
+ * @param ev    The SDL event
+ * @param event The ScummVM event.
+ * @return True if event was processed, false if not.
+ */
+bool WebOSSdlEventSource::handleKeyDown(SDL_Event &ev, Common::Event &event) {
+	// Handle gesture area tap.
+	if (ev.key.keysym.sym == SDLK_WORLD_71) {
+		gestureDown = true;
+		gestureDownTime = getMillis();
 		return true;
 	}
 
-	// Simulate middle mouse button
-	if (ev.button.button == SDL_BUTTON_LEFT && mouseButton == 2) {
-		event.type = Common::EVENT_MBUTTONDOWN;
-		fillMouseEvent(event, ev.button.x, ev.button.y);
-		printf("rbutton down\n");
+	// Call original SDL key handler.
+	return SdlEventSource::handleKeyDown(ev, event);
+}
+
+/**
+ * Before calling the original SDL implementation this method checks if the
+ * gesture area has been released.
+ *
+ * @param ev    The SDL event
+ * @param event The ScummVM event.
+ * @return True if event was processed, false if not.
+ */
+bool WebOSSdlEventSource::handleKeyUp(SDL_Event &ev, Common::Event &event) {
+	// Handle gesture area tap.
+	if (ev.key.keysym.sym == SDLK_WORLD_71) {
+		gestureDown = false;
 		return true;
 	}
 
-	// Invoke parent implementation of this method
-	return SdlEventSource::handleMouseButtonDown(ev, event);
+	// Call original SDL key handler.
+	return SdlEventSource::handleKeyUp(ev, event);
 }
 
-bool WebOSSdlEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &event) {
-	// Simulate right mouse button
-	if (ev.button.button == SDL_BUTTON_LEFT && mouseButton == 1) {
-		event.type = Common::EVENT_RBUTTONUP;
-		fillMouseEvent(event, ev.button.x, ev.button.y);
-		return true;
+/**
+ * Handles mouse button press.
+ *
+ * @param ev    The SDL event
+ * @param event The ScummVM event.
+ * @return True if event was processed, false if not.
+ */
+bool WebOSSdlEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &event) {
+	if (motionPtrIndex == -1) {
+		motionPtrIndex = ev.button.which;
+		dragDiffX = 0;
+		dragDiffY = 0;
+		screenDownTime = getMillis();
+
+		// Start dragging when pressing the screen shortly after a tap.
+		if (getMillis() - dragStartTime < 250) {
+			dragging = true;
+			event.type = Common::EVENT_LBUTTONDOWN;
+			fillMouseEvent(event, curX, curY);
+		}
 	}
+	return true;
+}
 
-	// Simulate right mouse button
-	if (ev.button.button == SDL_BUTTON_LEFT && mouseButton == 2) {
-		event.type = Common::EVENT_MBUTTONUP;
-		fillMouseEvent(event, ev.button.x, ev.button.y);
-		return true;
+/**
+ * Handles mouse button release.
+ *
+ * @param ev    The SDL event
+ * @param event The ScummVM event.
+ * @return True if event was processed, false if not.
+ */
+bool WebOSSdlEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &event) {
+	if (motionPtrIndex == ev.button.which) {
+		motionPtrIndex = -1;
+
+		// When drag mode was active then simply send a mouse up event
+		if (dragging)
+		{
+			event.type = Common::EVENT_LBUTTONUP;
+			fillMouseEvent(event, curX, curY);
+			dragging = false;
+			return true;
+		}
+
+		// When mouse was moved 5 pixels or less then emulate a mouse button
+		// click.
+		if (ABS(dragDiffX) < 6 && ABS(dragDiffY) < 6)
+		{
+			int duration = getMillis() - screenDownTime;
+
+			// When screen was pressed for less than 500ms then emulate a
+			// left mouse click.
+			if (duration < 500) {
+				event.type = Common::EVENT_LBUTTONUP;
+				fillMouseEvent(event, curX, curY);
+				g_system->getEventManager()->pushEvent(event);
+				event.type = Common::EVENT_LBUTTONDOWN;
+				dragStartTime = getMillis();
+			}
+
+			// When screen was pressed for less than 1000ms then emulate a
+			// right mouse click.
+			else if (duration < 1000) {
+				event.type = Common::EVENT_RBUTTONUP;
+				fillMouseEvent(event, curX, curY);
+				g_system->getEventManager()->pushEvent(event);
+				event.type = Common::EVENT_RBUTTONDOWN;
+			}
+
+			// When screen was pressed for more than 1000ms then emulate a
+			// middle mouse click.
+			else {
+				event.type = Common::EVENT_MBUTTONUP;
+				fillMouseEvent(event, curX, curY);
+				g_system->getEventManager()->pushEvent(event);
+				event.type = Common::EVENT_MBUTTONDOWN;
+			}
+
+		}
 	}
+	return true;
+}
 
-	// Invoke parent implementation of this method
-	return SdlEventSource::handleMouseButtonUp(ev, event);
+/**
+ * Handles mouse motion.
+ *
+ * @param ev    The SDL event
+ * @param event The ScummVM event.
+ * @return True if event was processed, false if not.
+ */
+bool WebOSSdlEventSource::handleMouseMotion(SDL_Event &ev, Common::Event &event) {
+	if (ev.motion.which == motionPtrIndex) {
+		int screenX = g_system->getWidth();
+		int screenY = g_system->getHeight();
+		curX = MIN(screenX, MAX(0, curX + ev.motion.xrel));
+		curY = MIN(screenY, MAX(0, curY + ev.motion.yrel));
+		dragDiffX += ev.motion.xrel;
+		dragDiffY += ev.motion.yrel;
+		event.type = Common::EVENT_MOUSEMOVE;
+		fillMouseEvent(event, curX, curY);
+	}
+	return true;
 }
 
 #endif
diff --git a/backends/events/webossdl/webossdl-events.h b/backends/events/webossdl/webossdl-events.h
index fc37fb8..3a41111 100644
--- a/backends/events/webossdl/webossdl-events.h
+++ b/backends/events/webossdl/webossdl-events.h
@@ -34,9 +34,11 @@
 class WebOSSdlEventSource : public SdlEventSource {
 protected:
 	virtual void SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &event);
-	virtual bool remapKey(SDL_Event &ev, Common::Event &event);
+	virtual bool handleKeyDown(SDL_Event &ev, Common::Event &event);
+	virtual bool handleKeyUp(SDL_Event &ev, Common::Event &event);
 	virtual bool handleMouseButtonDown(SDL_Event &ev, Common::Event &event);
 	virtual bool handleMouseButtonUp(SDL_Event &ev, Common::Event &event);
+	virtual bool handleMouseMotion(SDL_Event &ev, Common::Event &event);
 };
 
 #endif
diff --git a/backends/platform/webos/hardwarekeys.cpp b/backends/platform/webos/hardwarekeys.cpp
deleted file mode 100644
index d8869a4..0000000
--- a/backends/platform/webos/hardwarekeys.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-/* 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/platform/webos/keyboard.h"
-#include "backends/keymapper/keymapper.h"
-#include "common/keyboard.h"
-
-#ifdef ENABLE_KEYMAPPER
-
-using namespace Common;
-
-struct Key {
-	const char *hwId;
-	KeyCode keycode;
-	uint16 ascii;
-	const char *desc;
-	KeyType preferredAction;
-	bool shiftable;
-};
-
-static const Key keys[] = {
-	{"BACKSPACE", KEYCODE_BACKSPACE, ASCII_BACKSPACE, "Backspace", kActionKeyType, false},
-	{"RETURN", KEYCODE_RETURN, ASCII_RETURN, "Return", kActionKeyType, false},
-	{"ESCAPE", KEYCODE_ESCAPE, ASCII_ESCAPE, "Esc", kStartKeyType, false},
-	{"SPACE", KEYCODE_SPACE, ASCII_SPACE, "Space", kActionKeyType, false},
-	{"EXCLAIM", KEYCODE_EXCLAIM, '!', "!", kActionKeyType, false},
-	{"QUOTEDBL", KEYCODE_QUOTEDBL, '"', "\"", kActionKeyType, false},
-	{"HASH", KEYCODE_HASH, '#', "#", kActionKeyType, false},
-	{"DOLLAR", KEYCODE_DOLLAR, '$', "$", kActionKeyType, false},
-	{"AMPERSAND", KEYCODE_AMPERSAND, '&', "&", kActionKeyType, false},
-	{"QUOTE", KEYCODE_QUOTE, '\'', "'", kActionKeyType, false},
-	{"LEFTPAREN", KEYCODE_LEFTPAREN, '(', "(", kActionKeyType, false},
-	{"RIGHTPAREN", KEYCODE_RIGHTPAREN, ')', ")", kActionKeyType, false},
-	{"ASTERISK", KEYCODE_ASTERISK, '*', "*", kActionKeyType, false},
-	{"PLUS", KEYCODE_PLUS, '+', "+", kActionKeyType, false},
-	{"COMMA", KEYCODE_COMMA, ',', ",", kActionKeyType, false},
-	{"MINUS", KEYCODE_MINUS, '-', "-", kActionKeyType, false},
-	{"PERIOD", KEYCODE_PERIOD, '.', ".", kActionKeyType, false},
-	{"SLASH", KEYCODE_SLASH, '/', "/", kActionKeyType, false},
-	{"0", KEYCODE_0, '0', "0", kActionKeyType, false},
-	{"1", KEYCODE_1, '1', "1", kActionKeyType, false},
-	{"2", KEYCODE_2, '2', "2", kActionKeyType, false},
-	{"3", KEYCODE_3, '3', "3", kActionKeyType, false},
-	{"4", KEYCODE_4, '4', "4", kActionKeyType, false},
-	{"5", KEYCODE_5, '5', "5", kActionKeyType, false},
-	{"6", KEYCODE_6, '6', "6", kActionKeyType, false},
-	{"7", KEYCODE_7, '7', "7", kActionKeyType, false},
-	{"8", KEYCODE_8, '8', "8", kActionKeyType, false},
-	{"9", KEYCODE_9, '9', "9", kActionKeyType, false},
-	{"COLON", KEYCODE_COLON, ':', ":", kActionKeyType, false},
-	{"SEMICOLON", KEYCODE_SEMICOLON, ';', ";", kActionKeyType, false},
-	{"EQUALS", KEYCODE_EQUALS, '=', "=", kActionKeyType, false},
-	{"QUESTION", KEYCODE_QUESTION, '?', "?", kActionKeyType, false},
-	{"AT", KEYCODE_AT, '@', "@", kActionKeyType, false},
-
-	{"UNDERSCORE", KEYCODE_UNDERSCORE, '_', "_", kActionKeyType, false},
-	{"a", KEYCODE_a, 'a', "a", kActionKeyType, true},
-	{"b", KEYCODE_b, 'b', "b", kActionKeyType, true},
-	{"c", KEYCODE_c, 'c', "c", kActionKeyType, true},
-	{"d", KEYCODE_d, 'd', "d", kActionKeyType, true},
-	{"e", KEYCODE_e, 'e', "e", kActionKeyType, true},
-	{"f", KEYCODE_f, 'f', "f", kActionKeyType, true},
-	{"g", KEYCODE_g, 'g', "g", kActionKeyType, true},
-	{"h", KEYCODE_h, 'h', "h", kActionKeyType, true},
-	{"i", KEYCODE_i, 'i', "i", kActionKeyType, true},
-	{"j", KEYCODE_j, 'j', "j", kActionKeyType, true},
-	{"k", KEYCODE_k, 'k', "k", kActionKeyType, true},
-	{"l", KEYCODE_l, 'l', "l", kActionKeyType, true},
-	{"m", KEYCODE_m, 'm', "m", kActionKeyType, true},
-	{"n", KEYCODE_n, 'n', "n", kActionKeyType, true},
-	{"o", KEYCODE_o, 'o', "o", kActionKeyType, true},
-	{"p", KEYCODE_p, 'p', "p", kActionKeyType, true},
-	{"q", KEYCODE_q, 'q', "q", kActionKeyType, true},
-	{"r", KEYCODE_r, 'r', "r", kActionKeyType, true},
-	{"s", KEYCODE_s, 's', "s", kActionKeyType, true},
-	{"t", KEYCODE_t, 't', "t", kActionKeyType, true},
-	{"u", KEYCODE_u, 'u', "u", kActionKeyType, true},
-	{"v", KEYCODE_v, 'v', "v", kActionKeyType, true},
-	{"w", KEYCODE_w, 'w', "w", kActionKeyType, true},
-	{"x", KEYCODE_x, 'x', "x", kActionKeyType, true},
-	{"y", KEYCODE_y, 'y', "y", kActionKeyType, true},
-	{"z", KEYCODE_z, 'z', "z", kActionKeyType, true},
-
-	// Miscellaneous function keys
-	{ "FORWARD", (KeyCode) KEYCODE_FORWARD, ASCII_FORWARD, "Forward", kActionKeyType, false },
-
-	{0, KEYCODE_INVALID, 0, 0, kGenericKeyType, false}
-};
-
-struct Mod {
-	byte flag;
-	const char *id;
-	const char *desc;
-	bool shiftable;
-};
-
-static const Mod modifiers[] = {
-	{ 0, "", "", false },
-	{ KBD_CTRL, "C+", "Ctrl+", false },
-	{ KBD_SHIFT, "", "", true },
-	{ KBD_SHIFT | KBD_CTRL, "S+C+", "Shift+Ctrl+", true },
-	{ 0, 0, 0, false }
-};
-#endif
-
-Common::HardwareKeySet *OSystem_SDL_WebOS::getHardwareKeySet() {
-#ifdef ENABLE_KEYMAPPER
-
-	HardwareKeySet *keySet = new HardwareKeySet();
-	const Key *key;
-	const Mod *mod;
-	char fullKeyId[50];
-	char fullKeyDesc[100];
-	uint16 ascii;
-
-	for (mod = modifiers; mod->id; mod++) {
-		for (key = keys; key->hwId; key++) {
-			ascii = key->ascii;
-
-			if (mod->shiftable && key->shiftable) {
-				snprintf(fullKeyId, 50, "%s%c", mod->id, toupper(key->hwId[0]));
-				snprintf(fullKeyDesc, 100, "%s%c", mod->desc, toupper(key->desc[0]));
-				ascii = toupper(key->ascii);
-			} else if (mod->shiftable) {
-				snprintf(fullKeyId, 50, "S+%s%s", mod->id, key->hwId);
-				snprintf(fullKeyDesc, 100, "Shift+%s%s", mod->desc, key->desc);
-			} else {
-				snprintf(fullKeyId, 50, "%s%s", mod->id, key->hwId);
-				snprintf(fullKeyDesc, 100, "%s%s", mod->desc, key->desc);
-			}
-
-			keySet->addHardwareKey(new HardwareKey(fullKeyId, KeyState(key->keycode, ascii, mod->flag), fullKeyDesc, key->preferredAction ));
-		}
-	}
-
-	return keySet;
-
-#else
-	return 0;
-#endif
-}
diff --git a/backends/platform/webos/keyboard.h b/backends/platform/webos/keyboard.h
deleted file mode 100644
index 816996a..0000000
--- a/backends/platform/webos/keyboard.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* 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 WEBOS_KEYBOARD_H
-#define WEBOS_KEYBOARD_H
-
-enum {
-	KEYCODE_FORWARD = 229
-};
-
-enum {
-	ASCII_FORWARD = 229
-};
-
-#endif
diff --git a/backends/platform/webos/module.mk b/backends/platform/webos/module.mk
index 6f68b98..fe4ec1e 100644
--- a/backends/platform/webos/module.mk
+++ b/backends/platform/webos/module.mk
@@ -2,8 +2,7 @@ MODULE := backends/platform/webos
 
 MODULE_OBJS := \
 	main.o \
-	webos.o \
-	hardwarekeys.o
+	webos.o
 
 # We don't use rules.mk but rather manually update OBJS and MODULE_DIRS.
 MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
diff --git a/backends/platform/webos/webos.cpp b/backends/platform/webos/webos.cpp
index 34d6f68..2f3cd3d 100644
--- a/backends/platform/webos/webos.cpp
+++ b/backends/platform/webos/webos.cpp
@@ -25,14 +25,20 @@
 
 #include "backends/platform/webos/webos.h"
 #include "backends/events/webossdl/webossdl-events.h"
+#include "backends/keymapper/keymapper.h"
 
 #if defined(WEBOS)
 
+using namespace Common;
+
 OSystem_SDL_WebOS::OSystem_SDL_WebOS()
 	:
 	OSystem_POSIX("/media/cryptofs/apps/usr/palm/applications/org.scummvm.scummvm/scummvmrc") {
 }
 
+/**
+ * Initializes the backend.
+ */
 void OSystem_SDL_WebOS::initBackend() {
 	// Create the events manager
 	if (_eventSource == 0)
@@ -42,4 +48,26 @@ void OSystem_SDL_WebOS::initBackend() {
 	OSystem_SDL::initBackend();
 }
 
+/**
+ * Gets the original SDL hardware key set, adds WebOS specific keys and
+ * returns the new key set.
+ *
+ * @return The hardware key set with added webOS specific keys.
+ */
+HardwareKeySet *OSystem_SDL_WebOS::getHardwareKeySet() {
+#ifdef ENABLE_KEYMAPPER
+	// Get the original SDL hardware key set
+	HardwareKeySet *keySet = OSystem_SDL::getHardwareKeySet();
+
+	// Add WebOS specific keys
+	keySet->addHardwareKey(new HardwareKey("FORWARD",
+		KeyState((KeyCode) 229, 229, 0), "Forward", kActionKeyType));
+
+	// Return the modified hardware key set
+	return keySet;
+#else
+	return 0;
+#endif
+}
+
 #endif


Commit: 874ef4a73f0c5d4812df771c607dfe32ac599dd9
    https://github.com/scummvm/scummvm/commit/874ef4a73f0c5d4812df771c607dfe32ac599dd9
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:11:17-07:00

Commit Message:
WEBOS: Add a README file

Changed paths:
  A dists/webos/README.WebOS



diff --git a/dists/webos/README.WebOS b/dists/webos/README.WebOS
new file mode 100644
index 0000000..3623ceb
--- /dev/null
+++ b/dists/webos/README.WebOS
@@ -0,0 +1,20 @@
+README for the WebOS port of ScummVM
+------------------------------------
+
+CONTROLS
+
+  Touchscreen
+
+    The touchscreen operates like a touchpad. The mouse cursor is independent
+    of the touched point, it is moved relative to its current position.
+
+    Tap + movement: Mouse movement
+    Tap without movement: Left mouse button click
+    Tap held for >0.5s without movement: Right mouse button click
+    Tap held for >1s without movement: Middle mouse button click
+    Double Tap + movement: Drag and drop
+
+  Gesture area
+
+    Back gesture: Escape
+    Forward gesture: ScummVM menu


Commit: 20863c761bda22ef34581db90231d09280c9a623
    https://github.com/scummvm/scummvm/commit/20863c761bda22ef34581db90231d09280c9a623
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:11:17-07:00

Commit Message:
WEBOS: Add installation instructions to README

Changed paths:
    dists/webos/README.WebOS



diff --git a/dists/webos/README.WebOS b/dists/webos/README.WebOS
index 3623ceb..5947d86 100644
--- a/dists/webos/README.WebOS
+++ b/dists/webos/README.WebOS
@@ -1,6 +1,23 @@
 README for the WebOS port of ScummVM
 ------------------------------------
 
+INSTALLATION
+
+  When starting ScummVM the first time on a WebOS device it creates the
+  following directory structure on the flash drive:
+  
+    ScummVM/
+      Extras/
+      Games/
+      Plugins/
+      Saves/
+      Screenshots/
+      Themes/
+      
+  To install the games switch your WebOS device to USB drive mode and copy
+  the game folders into the ScummVM/Games directory. Then start ScummVM, 
+  click "Add game" and select the game folder.
+
 CONTROLS
 
   Touchscreen


Commit: 872e6f9b8c475700fdb79eed033fccb37dd3b75f
    https://github.com/scummvm/scummvm/commit/872e6f9b8c475700fdb79eed033fccb37dd3b75f
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:11:18-07:00

Commit Message:
WEBOS: Move scummvmrc to ScummVM data directory

scummvmrc is now located in ScummVM data directory and no
longer in app directory so it is accessible via USB drive mode.

Changed paths:
    backends/platform/webos/webos.cpp
    dists/webos/mojo/start



diff --git a/backends/platform/webos/webos.cpp b/backends/platform/webos/webos.cpp
index 2f3cd3d..7db17f4 100644
--- a/backends/platform/webos/webos.cpp
+++ b/backends/platform/webos/webos.cpp
@@ -33,7 +33,7 @@ using namespace Common;
 
 OSystem_SDL_WebOS::OSystem_SDL_WebOS()
 	:
-	OSystem_POSIX("/media/cryptofs/apps/usr/palm/applications/org.scummvm.scummvm/scummvmrc") {
+	OSystem_POSIX() {
 }
 
 /**
diff --git a/dists/webos/mojo/start b/dists/webos/mojo/start
old mode 100755
new mode 100644
index 55a7999..3bdb9a5
--- a/dists/webos/mojo/start
+++ b/dists/webos/mojo/start
@@ -1,30 +1,32 @@
 #!/bin/sh
 
-# Get app directory
+# Setup directories
 APPDIR=$(readlink -f $(dirname $0))
+SCUMMVMDIR=/media/internal/ScummVM
+
 
 # Create the initial ScummVM directory structure
-mkdir -p /media/internal/ScummVM/Games
-mkdir -p /media/internal/ScummVM/Saves
-mkdir -p /media/internal/ScummVM/Screenshots
-mkdir -p /media/internal/ScummVM/Themes
-mkdir -p /media/internal/ScummVM/Extras
-mkdir -p /media/internal/ScummVM/Plugins
+mkdir -p $SCUMMVMDIR/Games
+mkdir -p $SCUMMVMDIR/Saves
+mkdir -p $SCUMMVMDIR/Screenshots
+mkdir -p $SCUMMVMDIR/Themes
+mkdir -p $SCUMMVMDIR/Extras
+mkdir -p $SCUMMVMDIR/Plugins
 
 # Install default configuration file if not already present
-if [ ! -f $APPDIR/scummvmrc ]
+if [ ! -f $SCUMMVMDIR/scummvmrc ]
 then
-    cp $APPDIR/scummvmrc-default $APPDIR/scummvmrc
+    cp $APPDIR/scummvmrc-default $SCUMMVMDIR/scummvmrc
 fi
 
 # Copy themes to theme directory
-cp -f $APPDIR/share/scummvm/*.zip /media/internal/ScummVM/Themes
+cp -f $APPDIR/share/scummvm/*.zip $SCUMMVMDIR/Themes
 
 # Change into the screenshots directory so screenshots are saved there
-cd /media/internal/ScummVM/Screenshots
+cd $SCUMMVMDIR/Screenshots
 
 # Set library path so the app finds its custom shared libraries
 export LD_LIBRARY_PATH=$APPDIR/lib
 
 # Run the game
-exec $APPDIR/bin/scummvm -c $APPDIR/scummvmrc
+exec $APPDIR/bin/scummvm -c $SCUMMVMDIR/scummvmrc


Commit: 2a2d65051da0edd6075da74b0adcb6e8c8469f3d
    https://github.com/scummvm/scummvm/commit/2a2d65051da0edd6075da74b0adcb6e8c8469f3d
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:11:18-07:00

Commit Message:
WEBOS: Correct executable flag on start script

Changed paths:
    dists/webos/mojo/start



diff --git a/dists/webos/mojo/start b/dists/webos/mojo/start
old mode 100644
new mode 100755


Commit: 1bc38d25323d3ca7b3e07f8d2d4b8ea48b7e0618
    https://github.com/scummvm/scummvm/commit/1bc38d25323d3ca7b3e07f8d2d4b8ea48b7e0618
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:11:18-07:00

Commit Message:
WEBOS: Use STRIP variable to strip the binary

Changed paths:
    backends/platform/webos/webos.mk



diff --git a/backends/platform/webos/webos.mk b/backends/platform/webos/webos.mk
index e567b38..885c9eb 100644
--- a/backends/platform/webos/webos.mk
+++ b/backends/platform/webos/webos.mk
@@ -16,7 +16,7 @@ webosrelease:
 	cp -f gui/themes/translations.dat $(STAGING_DIR)/share/scummvm
 	cp -f gui/themes/scummmodern.zip $(STAGING_DIR)/share/scummvm
 	cp -f scummvm $(STAGING_DIR)/bin
-	$(WEBOS_PDK)/arm-gcc/bin/arm-none-linux-gnueabi-strip $(STAGING_DIR)/bin/scummvm
+	$(STRIP) $(STAGING_DIR)/bin/scummvm
 	$(WEBOS_SDK)/bin/palm-package $(STAGING_DIR)
 	rm -rf STAGING
 


Commit: 91e43bb136b00ab890118cfe6fb362d002ab0eba
    https://github.com/scummvm/scummvm/commit/91e43bb136b00ab890118cfe6fb362d002ab0eba
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:11:18-07:00

Commit Message:
WEBOS: Correct indentation of WEBOS preprocessor check

Changed paths:
    backends/platform/sdl/sdl.cpp



diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index d0036b4..d6e7924 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -213,11 +213,11 @@ void OSystem_SDL::initSDL() {
 		uint32 sdlFlags = 0;
 		if (ConfMan.hasKey("disable_sdl_parachute"))
 			sdlFlags |= SDL_INIT_NOPARACHUTE;
-		
-		#ifdef WEBOS
+
+#ifdef WEBOS
 		// WebOS needs this flag or otherwise the application won't start
 		sdlFlags |= SDL_INIT_VIDEO;
-		#endif
+#endif
 
 		// Initialize SDL (SDL Subsystems are initiliazed in the corresponding sdl managers)
 		if (SDL_Init(sdlFlags) == -1)


Commit: bc0ed249156fe5a88c9cc1394cba59bb7ff417ff
    https://github.com/scummvm/scummvm/commit/bc0ed249156fe5a88c9cc1394cba59bb7ff417ff
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:11:19-07:00

Commit Message:
CREDITS: Add credits for WebOS backend

Changed paths:
    AUTHORS
    devtools/credits.pl
    gui/credits.h



diff --git a/AUTHORS b/AUTHORS
index 973cf68..adc23e5 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -236,6 +236,9 @@ ScummVM Team
        Jurgen Braam
        Lars Persson
 
+    WebOS:
+       Klaus Reimer
+
     Wii:
        Andre Heider
 
diff --git a/devtools/credits.pl b/devtools/credits.pl
index 349197d..075d7b0 100755
--- a/devtools/credits.pl
+++ b/devtools/credits.pl
@@ -765,6 +765,10 @@ begin_credits("Credits");
 		  add_person("Lars Persson", "AnotherGuest", "");
 	  end_section();
 
+	  begin_section("WebOS");
+		  add_person("Klaus Reimer", "kayahr", "");
+	  end_section();
+
 	  begin_section("Wii");
 		  add_person("Andre Heider", "dhewg", "");
 	  end_section();
diff --git a/gui/credits.h b/gui/credits.h
index 762e22f..a6a8a4f 100644
--- a/gui/credits.h
+++ b/gui/credits.h
@@ -262,6 +262,9 @@ static const char *credits[] = {
 "C0""Jurgen Braam",
 "C0""Lars Persson",
 "",
+"C1""WebOS",
+"C0""Klaus Reimer",
+"",
 "C1""Wii",
 "C0""Andre Heider",
 "",


Commit: a16e9c0920b6b2c380f7c9060b2b6e37432abdea
    https://github.com/scummvm/scummvm/commit/a16e9c0920b6b2c380f7c9060b2b6e37432abdea
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:11:19-07:00

Commit Message:
WEBOS: Add PDK paths to LDFLAGS & INCLUDES; enable dynamic plugins support

Changed paths:
    configure



diff --git a/configure b/configure
index feae65e..5bb564f 100755
--- a/configure
+++ b/configure
@@ -1669,7 +1669,7 @@ case $_host_os in
 		;;
 	webos)
 		CXXFLAGS="$CXXFLAGS --sysroot=$WEBOS_PDK/arm-gcc/sysroot"
-		LDFLAGS="$LDFLAGS -L$WEBOS_PDK/device/lib"
+		LDFLAGS="$LDFLAGS -L$WEBOS_PDK/device/lib -L$WEBOS_PDK/device/usr/lib"
 		LDFLAGS="$LDFLAGS -Wl,--allow-shlib-undefined"
 		add_line_to_config_mk "WEBOS_SDK = $WEBOS_SDK"
 		_unix=yes
@@ -2069,6 +2069,7 @@ if test -n "$_host"; then
 			_seq_midi=no
 			_vkeybd=no
 			_keymapper=yes
+			_opengles=yes
 			;;
 		wii)
 			_endian=big
@@ -2321,7 +2322,7 @@ POST_OBJS_FLAGS := -Wl,-no-whole-archive
 LIBS            += -ldl
 '
 		;;
-	linux*)
+	linux* | webos)
 _def_plugin='
 #define PLUGIN_PREFIX	"lib"
 #define PLUGIN_SUFFIX	".so"
@@ -3133,7 +3134,7 @@ case $_backend in
 		DEFINES="$DEFINES -DSDL_BACKEND"
 		;;
 	webos)
-		INCLUDES="$INCLUDES -I$WEBOS_PDK/include -I$WEBOS_PDK/include/SDL"
+		INCLUDES="$INCLUDES -I$WEBOS_PDK/include -I$WEBOS_PDK/include/SDL -I$WEBOS_PDK/device/usr/include"
 		LIBS="$LIBS -lSDL -lpdl"
 		DEFINES="$DEFINES -DSDL_BACKEND -DWEBOS"
 		MODULES="$MODULES backends/platform/sdl"


Commit: c9da4a278547e9651f55dc71c72b09d605846fba
    https://github.com/scummvm/scummvm/commit/c9da4a278547e9651f55dc71c72b09d605846fba
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:11:19-07:00

Commit Message:
GIT: Ignore /plugins directory

Changed paths:
    .gitignore



diff --git a/.gitignore b/.gitignore
index 5e1ff61..bff5ead 100644
--- a/.gitignore
+++ b/.gitignore
@@ -88,6 +88,8 @@ lib*.a
 /doc/*.ps
 /doc/*.toc
 
+/plugins
+
 /test/runner
 /test/runner.cpp
 /test/*.dSYM


Commit: fbc58d21ffe7e869b6d6387c72c02fdba32431d8
    https://github.com/scummvm/scummvm/commit/fbc58d21ffe7e869b6d6387c72c02fdba32431d8
Author: Klaus Reimer (k at ailis.de)
Date: 2011-04-12T02:11:20-07:00

Commit Message:
WEBOS: Disable opengl support; move --sysroot to LDFLAGS where it belongs

Changed paths:
    configure



diff --git a/configure b/configure
index 5bb564f..a8810ca 100755
--- a/configure
+++ b/configure
@@ -1668,9 +1668,9 @@ case $_host_os in
 		_unix=yes
 		;;
 	webos)
-		CXXFLAGS="$CXXFLAGS --sysroot=$WEBOS_PDK/arm-gcc/sysroot"
 		LDFLAGS="$LDFLAGS -L$WEBOS_PDK/device/lib -L$WEBOS_PDK/device/usr/lib"
 		LDFLAGS="$LDFLAGS -Wl,--allow-shlib-undefined"
+		LDFLAGS="$LDFLAGS --sysroot=$WEBOS_PDK/arm-gcc/sysroot"
 		add_line_to_config_mk "WEBOS_SDK = $WEBOS_SDK"
 		_unix=yes
 		_seq_midi=no
@@ -2069,7 +2069,6 @@ if test -n "$_host"; then
 			_seq_midi=no
 			_vkeybd=no
 			_keymapper=yes
-			_opengles=yes
 			;;
 		wii)
 			_endian=big






More information about the Scummvm-git-logs mailing list