mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
input: move default bind handling to input core
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@952 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
cca8800dfb
commit
a70e251871
2 changed files with 34 additions and 11 deletions
|
@ -61,6 +61,7 @@ enum {
|
|||
IN_CFG_KEY_NAMES,
|
||||
IN_CFG_ABS_DEAD_ZONE, /* dead zone for analog-digital mapping */
|
||||
IN_CFG_ABS_AXIS_COUNT, /* number of abs axes (ro) */
|
||||
IN_CFG_DEFAULT_DEV,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -79,7 +80,6 @@ typedef struct {
|
|||
void (*free)(void *drv_data);
|
||||
const char * const *
|
||||
(*get_key_names)(int *count);
|
||||
void (*get_def_binds)(int *binds);
|
||||
int (*clean_binds)(void *drv_data, int *binds, int *def_finds);
|
||||
int (*get_config)(void *drv_data, int what, int *val);
|
||||
int (*set_config)(void *drv_data, int what, int val);
|
||||
|
@ -90,6 +90,8 @@ typedef struct {
|
|||
int (*menu_translate)(void *drv_data, int keycode);
|
||||
int (*get_key_code)(const char *key_name);
|
||||
const char * (*get_key_name)(int keycode);
|
||||
|
||||
const struct in_default_bind *defbinds;
|
||||
} in_drv_t;
|
||||
|
||||
struct in_default_bind {
|
||||
|
@ -99,7 +101,7 @@ struct in_default_bind {
|
|||
};
|
||||
|
||||
/* to be called by drivers */
|
||||
int in_register_driver(const in_drv_t *drv);
|
||||
int in_register_driver(const in_drv_t *drv, const struct in_default_bind *defbinds);
|
||||
void in_register(const char *nname, int drv_fd_hnd, void *drv_data,
|
||||
int key_count, const char * const *key_names, int combos);
|
||||
void in_combos_find(const int *binds, int last_key, int *combo_keys, int *combo_acts);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue