mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
input: support analog read
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@938 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
76bc7a1d9a
commit
bdefb7c143
2 changed files with 47 additions and 21 deletions
|
@ -2,6 +2,7 @@
|
|||
#define INCLUDE_uXt8Z4R7EMpuEEtvSibXjNhKH3741VNc 1
|
||||
|
||||
#define IN_MAX_DEVS 10
|
||||
#define IN_ABS_RANGE 1024 /* abs must be centered at 0, move upto +- this */
|
||||
|
||||
/* unified menu keys */
|
||||
#define PBTN_UP (1 << 0)
|
||||
|
@ -58,7 +59,8 @@ enum {
|
|||
IN_CFG_DOES_COMBOS,
|
||||
IN_CFG_BLOCKING,
|
||||
IN_CFG_KEY_NAMES,
|
||||
IN_CFG_ABS_DEAD_ZONE, /* dead zone for analog-digital mapping */
|
||||
IN_CFG_ABS_DEAD_ZONE, /* dead zone for analog-digital mapping */
|
||||
IN_CFG_ABS_AXIS_COUNT, /* number of abs axes (ro) */
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -82,6 +84,7 @@ typedef struct {
|
|||
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);
|
||||
int (*update_analog)(void *drv_data, int axis_id, 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);
|
||||
|
@ -105,6 +108,7 @@ int in_combos_do(int keys, const int *binds, int last_key, int combo_keys, int
|
|||
void in_init(void);
|
||||
void in_probe(void);
|
||||
int in_update(int *result);
|
||||
int in_update_analog(int dev_id, int axis_id, int *value);
|
||||
int in_update_keycode(int *dev_id, int *is_down, int timeout_ms);
|
||||
int in_menu_wait_any(int timeout_ms);
|
||||
int in_menu_wait(int interesting, int autorep_delay_ms);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue