mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
input: get rid of pl2 flag, use 'bind types' instead
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@713 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
a47dd66367
commit
093b8a420e
10 changed files with 318 additions and 255 deletions
|
@ -58,13 +58,23 @@ enum {
|
|||
IN_INFO_DOES_COMBOS,
|
||||
};
|
||||
|
||||
enum {
|
||||
IN_BINDTYPE_NONE = -1,
|
||||
IN_BINDTYPE_EMU = 0,
|
||||
IN_BINDTYPE_PLAYER12,
|
||||
IN_BINDTYPE_COUNT
|
||||
};
|
||||
|
||||
#define IN_BIND_OFFS(key, btype) \
|
||||
((key) * IN_BINDTYPE_COUNT + (btype))
|
||||
|
||||
typedef struct {
|
||||
const char *prefix;
|
||||
void (*probe)(void);
|
||||
void (*free)(void *drv_data);
|
||||
int (*get_bind_count)(void);
|
||||
void (*get_def_binds)(int *binds);
|
||||
int (*clean_binds)(void *drv_data, int *binds);
|
||||
int (*clean_binds)(void *drv_data, int *binds, int *def_finds);
|
||||
void (*set_blocking)(void *data, int y);
|
||||
int (*update_keycode)(void *drv_data, int *is_down);
|
||||
int (*menu_translate)(int keycode);
|
||||
|
@ -74,13 +84,14 @@ typedef struct {
|
|||
|
||||
|
||||
/* to be called by drivers */
|
||||
void in_register(const char *nname, int drv_id, int fd_hnd, void *drv_data, int combos);
|
||||
void in_combos_find(int *binds, int last_key, int *combo_keys, int *combo_acts);
|
||||
int in_combos_do(int keys, int *binds, int last_key, int combo_keys, int combo_acts);
|
||||
void in_register(const char *nname, int drv_id, int drv_fd_hnd, void *drv_data,
|
||||
int key_count, 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);
|
||||
|
||||
void in_init(void);
|
||||
void in_probe(void);
|
||||
int in_update(void);
|
||||
int in_update(int *result);
|
||||
void in_set_blocking(int is_blocking);
|
||||
int in_update_keycode(int *dev_id, int *is_down, int timeout_ms);
|
||||
int in_menu_wait_any(int timeout_ms);
|
||||
|
@ -88,9 +99,9 @@ int in_menu_wait(int interesting, int autorep_delay_ms);
|
|||
int in_get_dev_info(int dev_id, int what);
|
||||
void in_config_start(void);
|
||||
int in_config_parse_dev(const char *dev_name);
|
||||
int in_config_bind_key(int dev_id, const char *key, int mask);
|
||||
int in_config_bind_key(int dev_id, const char *key, int binds, int bind_type);
|
||||
void in_config_end(void);
|
||||
int in_bind_key(int dev_id, int keycode, int mask, int force_unbind);
|
||||
int in_bind_key(int dev_id, int keycode, int bind_type, int mask, int force_unbind);
|
||||
void in_debug_dump(void);
|
||||
|
||||
const int *in_get_dev_binds(int dev_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue