Samsung YH820/92x keymap bugfixes

This patch fixes some (mostly small) plugin issues with the "big"
YH-keymap patch (a507b). Only one fix affects the main keymaps
(virtual keyboard "DONE" now exits after long key /release/ instead
of long button /press/).

Change-Id: Id34f925ebfa97ae4974cd9405fbe1fee4f597833
This commit is contained in:
Sebastian Leonhardt 2015-12-27 18:14:41 +01:00
parent ad65f8cc71
commit 5e91ec1401
21 changed files with 140 additions and 81 deletions

View file

@ -495,7 +495,8 @@
#define SOKOBAN_RIGHT BUTTON_RIGHT
#define SOKOBAN_UP BUTTON_UP
#define SOKOBAN_DOWN BUTTON_DOWN
#define SOKOBAN_MENU BUTTON_PLAY
#define SOKOBAN_MENU_PRE BUTTON_PLAY
#define SOKOBAN_MENU (BUTTON_PLAY | BUTTON_REL)
#define SOKOBAN_UNDO BUTTON_REW
#define SOKOBAN_REDO BUTTON_FFWD
#define SOKOBAN_LEVEL_DOWN (BUTTON_PLAY | BUTTON_DOWN)
@ -1690,7 +1691,7 @@ static bool sokoban_loop(void)
{
bool moved;
int i = 0, button = 0;
#if defined(SOKOBAN_UNDO_PRE)
#if defined(SOKOBAN_UNDO_PRE) || defined(SOKOBAN_MENU_PRE)
int lastbutton = 0;
#endif
int w, h;
@ -1703,10 +1704,15 @@ static bool sokoban_loop(void)
switch(button)
{
case SOKOBAN_MENU:
#ifdef SOKOBAN_MENU_PRE
if (lastbutton != SOKOBAN_MENU_PRE)
break;
/* fallthrough */
#endif
#ifdef SOKOBAN_RC_MENU
case SOKOBAN_RC_MENU:
#endif
case SOKOBAN_MENU:
switch (sokoban_menu()) {
case 5: /* Quit */
case 6: /* Save & quit */
@ -1794,7 +1800,7 @@ static bool sokoban_loop(void)
return PLUGIN_USB_CONNECTED;
break;
}
#if defined(SOKOBAN_UNDO_PRE)
#if defined(SOKOBAN_UNDO_PRE) || defined(SOKOBAN_MENU_PRE)
lastbutton = button;
#endif