projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
05f79aa
)
added toggling virtual buttons using 'menu' button on Android
author
Holger Schemel
<info@artsoft.org>
Tue, 11 Dec 2018 22:53:07 +0000
(23:53 +0100)
committer
Holger Schemel
<info@artsoft.org>
Tue, 11 Dec 2018 22:53:07 +0000
(23:53 +0100)
src/events.c
patch
|
blob
|
history
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