home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed redundancy between record_control() and player_control() by re-writing their...
[plomrogue]
/
src
/
keybindings.c
diff --git
a/src/keybindings.c
b/src/keybindings.c
index 709813c89a98a6d98832a37085acaf013c4ff991..52c6c7077a8e8b0ed67b33ed0d293748bf42e0f5 100644
(file)
--- a/
src/keybindings.c
+++ b/
src/keybindings.c
@@
-37,6
+37,21
@@
static uint8_t try_keycode(uint16_t keycode_given, char * keyname,
+extern char * get_func_to_keycode(struct KeyBinding * kb_p, uint16_t key)
+{
+ while (0 != kb_p)
+ {
+ if (key == kb_p->key)
+ {
+ return kb_p->name;
+ }
+ kb_p = kb_p->next;
+ }
+ return NULL;
+}
+
+
+
extern uint16_t get_keycode_to_action(struct KeyBinding * kb_p, char * name)
{
while (0 != kb_p)
extern uint16_t get_keycode_to_action(struct KeyBinding * kb_p, char * name)
{
while (0 != kb_p)