aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoron Rosenberg2011-08-04 10:44:06 -0700
committerDoron Rosenberg2011-08-04 10:44:06 -0700
commit0ceb7b4ccd89150e46f92545bf4bdbb070cede12 (patch)
treed59f5263797f9e6bebddd29e996d8a811408f960
parent3126b06600016893f85e492b645a0773847aeb39 (diff)
downloadscummvm-rg350-0ceb7b4ccd89150e46f92545bf4bdbb070cede12.tar.gz
scummvm-rg350-0ceb7b4ccd89150e46f92545bf4bdbb070cede12.tar.bz2
scummvm-rg350-0ceb7b4ccd89150e46f92545bf4bdbb070cede12.zip
WebOS: touchpad virtual keyboard
-rw-r--r--backends/events/webossdl/webossdl-events.cpp28
-rwxr-xr-xconfigure2
2 files changed, 25 insertions, 5 deletions
diff --git a/backends/events/webossdl/webossdl-events.cpp b/backends/events/webossdl/webossdl-events.cpp
index acc54e0bd2..00cbf39d08 100644
--- a/backends/events/webossdl/webossdl-events.cpp
+++ b/backends/events/webossdl/webossdl-events.cpp
@@ -33,6 +33,7 @@
#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;
@@ -138,6 +139,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);
}
@@ -178,11 +189,20 @@ bool WebOSSdlEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &even
motionPtrIndex = -1;
int screenY = g_system->getHeight();
- // 60% of the screen height for menu dialog
+
+ // 60% of the screen height for menu dialog/keyboard
if (ABS(dragDiffY) >= ABS(screenY*0.6)) {
- if (g_engine && !g_engine->isPaused()) {
- g_engine->openMainMenuDialog();
- return true;
+ if (dragDiffY >= 0) {
+ int gblPDKVersion = PDL_GetPDKVersion();
+ // check for correct PDK Version
+ if (gblPDKVersion >= 300) {
+ PDL_SetKeyboardState(PDL_TRUE);
+ }
+ } else {
+ if (g_engine && !g_engine->isPaused()) {
+ g_engine->openMainMenuDialog();
+ return true;
+ }
}
}
diff --git a/configure b/configure
index d5e2345acb..e330722c9d 100755
--- a/configure
+++ b/configure
@@ -2395,7 +2395,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"