aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"