mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
Add a callback for when key_dest is set.
This commit is contained in:
parent
52146947c1
commit
603fe92cba
2 changed files with 4 additions and 0 deletions
|
@ -431,6 +431,7 @@ extern keydest_t key_dest;
|
|||
extern imt_t key_game_target;
|
||||
extern knum_t key_togglemenu;
|
||||
extern knum_t key_toggleconsole;
|
||||
extern void (*key_dest_callback) (void);
|
||||
|
||||
extern struct keybind_s {
|
||||
char *str;
|
||||
|
|
|
@ -59,6 +59,7 @@ VISIBLE keydest_t key_dest = key_console;
|
|||
VISIBLE imt_t key_game_target = IMT_0;
|
||||
VISIBLE knum_t key_togglemenu = QFK_ESCAPE;
|
||||
VISIBLE knum_t key_toggleconsole = QFK_BACKQUOTE;
|
||||
VISIBLE void (*key_dest_callback) (void);
|
||||
|
||||
VISIBLE struct keybind_s keybindings[IMT_LAST][QFK_LAST];
|
||||
VISIBLE int keydown[QFK_LAST];
|
||||
|
@ -980,4 +981,6 @@ Key_SetKeyDest(keydest_t kd)
|
|||
game_target = IMT_CONSOLE;
|
||||
break;
|
||||
}
|
||||
if (key_dest_callback)
|
||||
key_dest_callback ();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue