Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

touchpad virtual keyboard

  • Loading branch information...
commit 3c15930d20c8187893efddac9665991ed04e1e6f 1 parent 1d03414
@nexapps authored
Showing with 25 additions and 5 deletions.
  1. +24 −4 backends/events/webossdl/webossdl-events.cpp
  2. +1 −1  configure
View
28 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;
+ }
}
}
View
2  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"
Please sign in to comment.
Something went wrong with that request. Please try again.