mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 00:12:59 +00:00
Merge branch 'master' of git://github.com/nexapps/scummvm into nexapps
This commit is contained in:
commit
5c1f13251e
@ -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
2
configure
vendored
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user