mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
input: make it more modular
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@934 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
4187c0ea57
commit
dde168a10e
2 changed files with 62 additions and 78 deletions
|
@ -49,14 +49,6 @@
|
|||
#define PEV_MASK 0x7ff80000
|
||||
|
||||
|
||||
enum {
|
||||
IN_DRVID_UNKNOWN = 0,
|
||||
IN_DRVID_GP2X,
|
||||
IN_DRVID_EVDEV,
|
||||
IN_DRVID_VK,
|
||||
IN_DRVID_COUNT,
|
||||
};
|
||||
|
||||
enum {
|
||||
IN_CFG_BIND_COUNT = 0,
|
||||
IN_CFG_DOES_COMBOS,
|
||||
|
@ -79,13 +71,13 @@ typedef struct {
|
|||
const char *prefix;
|
||||
void (*probe)(void);
|
||||
void (*free)(void *drv_data);
|
||||
int (*get_bind_count)(void);
|
||||
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);
|
||||
int (*update)(void *drv_data, const int *binds, int *result);
|
||||
/* return -1 on no event, -2 on error */
|
||||
int (*update_keycode)(void *drv_data, int *is_down);
|
||||
int (*menu_translate)(void *drv_data, int keycode);
|
||||
|
@ -100,7 +92,8 @@ struct in_default_bind {
|
|||
};
|
||||
|
||||
/* to be called by drivers */
|
||||
void in_register(const char *nname, int drv_id, int drv_fd_hnd, void *drv_data,
|
||||
int in_register_driver(const in_drv_t *drv);
|
||||
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);
|
||||
int in_combos_do(int keys, const int *binds, int last_key, int combo_keys, int combo_acts);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue