aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomFrost2011-09-03 14:23:14 -0400
committerTomFrost2011-09-03 14:23:14 -0400
commit5c1f13251e0a0e94030c286beb8d770f07778583 (patch)
tree213ff2881e4c8447890c17e047064156975bab9e
parent7f5f9c9f91eb8cd52ebcffe208d0e778f8ff6448 (diff)
parent28201a1e9d1825ea2b590288f06003a8ae7a7e00 (diff)
downloadscummvm-rg350-5c1f13251e0a0e94030c286beb8d770f07778583.tar.gz
scummvm-rg350-5c1f13251e0a0e94030c286beb8d770f07778583.tar.bz2
scummvm-rg350-5c1f13251e0a0e94030c286beb8d770f07778583.zip
Merge branch 'master' of git://github.com/nexapps/scummvm into nexapps
-rw-r--r--backends/events/webossdl/webossdl-events.cpp41
-rwxr-xr-xconfigure2
2 files changed, 42 insertions, 1 deletions
diff --git a/backends/events/webossdl/webossdl-events.cpp b/backends/events/webossdl/webossdl-events.cpp
index a6a2ed3644..820efe25c5 100644
--- a/backends/events/webossdl/webossdl-events.cpp
+++ b/backends/events/webossdl/webossdl-events.cpp
@@ -32,6 +32,8 @@
#include "backends/events/webossdl/webossdl-events.h"
#include "gui/message.h"
+#include "engines/engine.h"
+#include "PDL.h"
// Inidicates if gesture area is pressed down or not.
static bool gestureDown = false;
@@ -118,6 +120,16 @@ bool WebOSSdlEventSource::handleKeyDown(SDL_Event &ev, Common::Event &event) {
gestureDown = false;
}
+ // handle virtual keyboard dismiss key
+ if (ev.key.keysym.sym == 24) {
+ int gblPDKVersion = PDL_GetPDKVersion();
+ // check for correct PDK Version
+ if (gblPDKVersion >= 300) {
+ PDL_SetKeyboardState(PDL_FALSE);
+ return true;
+ }
+ }
+
// Call original SDL key handler.
return SdlEventSource::handleKeyDown(ev, event);
}
@@ -137,6 +149,16 @@ bool WebOSSdlEventSource::handleKeyUp(SDL_Event &ev, Common::Event &event) {
return true;
}
+ // handle virtual keyboard dismiss key
+ if (ev.key.keysym.sym == 24) {
+ int gblPDKVersion = PDL_GetPDKVersion();
+ // check for correct PDK Version
+ if (gblPDKVersion >= 300) {
+ PDL_SetKeyboardState(PDL_FALSE);
+ return true;
+ }
+ }
+
// Call original SDL key handler.
return SdlEventSource::handleKeyUp(ev, event);
}
@@ -176,6 +198,25 @@ bool WebOSSdlEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &even
if (motionPtrIndex == ev.button.which) {
motionPtrIndex = -1;
+ int screenY = g_system->getHeight();
+
+ // 60% of the screen height for menu dialog/keyboard
+ if (ABS(dragDiffY) >= ABS(screenY*0.6)) {
+ if (dragDiffY >= 0) {
+ int gblPDKVersion = PDL_GetPDKVersion();
+ // check for correct PDK Version
+ if (gblPDKVersion >= 300) {
+ PDL_SetKeyboardState(PDL_TRUE);
+ return true;
+ }
+ } else {
+ if (g_engine && !g_engine->isPaused()) {
+ g_engine->openMainMenuDialog();
+ return true;
+ }
+ }
+ }
+
// When drag mode was active then simply send a mouse up event
if (dragging)
{
diff --git a/configure b/configure
index 278b917ea1..9a824b97ed 100755
--- a/configure
+++ b/configure
@@ -2504,7 +2504,7 @@ case $_backend in
;;
webos)
# There is no sdl-config in the WebOS PDK so we don't use find_sdlconfig here.
- LIBS="$LIBS -lSDL"
+ LIBS="$LIBS -lSDL -lpdl"
DEFINES="$DEFINES -DWEBOS"
DEFINES="$DEFINES -DSDL_BACKEND"
add_line_to_config_mk "SDL_BACKEND = 1"