projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added toggling virtual buttons using 'menu' button on Android
[rocksndiamonds.git]
/
src
/
events.c
diff --git
a/src/events.c
b/src/events.c
index 6fee5bbce8684de0badc8642ca52a9bfeeb76e68..f3330a7ee318ece3e7578f01551a509161c4396f 100644
(file)
--- a/
src/events.c
+++ b/
src/events.c
@@
-1452,9
+1452,15
@@
void HandleKeyEvent(KeyEvent *event)
// always map the "back" button to the "escape" key on Android devices
key = KSYM_Escape;
}
// always map the "back" button to the "escape" key on Android devices
key = KSYM_Escape;
}
+ else if (key == KSYM_Menu)
+ {
+ // the "menu" button can be used to toggle displaying virtual buttons
+ if (key_status == KEY_PRESSED)
+ SetOverlayEnabled(!GetOverlayEnabled());
+ }
else
{
else
{
- // for any
key event other than "back" button, disable overlay
buttons
+ // for any
other "real" key event, disable virtual
buttons
SetOverlayEnabled(FALSE);
}
#endif
SetOverlayEnabled(FALSE);
}
#endif