Merge branch 'master' of git://github.com/nexapps/scummvm into nexapps

This commit is contained in:
TomFrost 2011-09-03 14:23:14 -04:00
commit 5c1f13251e
2 changed files with 42 additions and 1 deletions

View File

@ -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)
{

2
configure vendored
View File

@ -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"