aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorDoron Rosenberg2011-08-04 10:44:06 -0700
committerDoron Rosenberg2011-08-04 10:44:06 -0700
commit0ceb7b4ccd89150e46f92545bf4bdbb070cede12 (patch)
treed59f5263797f9e6bebddd29e996d8a811408f960 /backends
parent3126b06600016893f85e492b645a0773847aeb39 (diff)
downloadscummvm-rg350-0ceb7b4ccd89150e46f92545bf4bdbb070cede12.tar.gz
scummvm-rg350-0ceb7b4ccd89150e46f92545bf4bdbb070cede12.tar.bz2
scummvm-rg350-0ceb7b4ccd89150e46f92545bf4bdbb070cede12.zip
WebOS: touchpad virtual keyboard
Diffstat (limited to 'backends')
-rw-r--r--backends/events/webossdl/webossdl-events.cpp28
1 files changed, 24 insertions, 4 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;
+ }
}
}