mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
in_evdev: remove defbinds (should go to plat code)
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@907 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
72f3f17598
commit
ea5da0bae3
2 changed files with 9 additions and 5 deletions
|
@ -520,6 +520,8 @@ static int in_evdev_menu_translate(void *drv_data, int keycode)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME: move to plat */
|
||||||
|
#if 0
|
||||||
static const struct {
|
static const struct {
|
||||||
short code;
|
short code;
|
||||||
char btype;
|
char btype;
|
||||||
|
@ -553,16 +555,16 @@ static const struct {
|
||||||
{ BTN_PINKIE, IN_BINDTYPE_EMU, PEVB_STATE_LOAD },
|
{ BTN_PINKIE, IN_BINDTYPE_EMU, PEVB_STATE_LOAD },
|
||||||
{ BTN_BASE, IN_BINDTYPE_EMU, PEVB_MENU },
|
{ BTN_BASE, IN_BINDTYPE_EMU, PEVB_MENU },
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
#define DEF_BIND_COUNT (sizeof(in_evdev_def_binds) / sizeof(in_evdev_def_binds[0]))
|
|
||||||
|
|
||||||
static void in_evdev_get_def_binds(int *binds)
|
static void in_evdev_get_def_binds(int *binds)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < DEF_BIND_COUNT; i++)
|
for (i = 0; in_evdev_defbinds[i].bit != 0; i++) {
|
||||||
binds[IN_BIND_OFFS(in_evdev_def_binds[i].code, in_evdev_def_binds[i].btype)] =
|
binds[IN_BIND_OFFS(in_evdev_defbinds[i].code, in_evdev_defbinds[i].btype)] =
|
||||||
1 << in_evdev_def_binds[i].bit;
|
1 << in_evdev_defbinds[i].bit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remove binds of missing keys, count remaining ones */
|
/* remove binds of missing keys, count remaining ones */
|
||||||
|
|
|
@ -2,3 +2,5 @@
|
||||||
void in_evdev_init(void *vdrv);
|
void in_evdev_init(void *vdrv);
|
||||||
int in_evdev_update(void *drv_data, const int *binds, int *result);
|
int in_evdev_update(void *drv_data, const int *binds, int *result);
|
||||||
|
|
||||||
|
/* to be set somewhere in platform code */
|
||||||
|
extern struct in_default_bind in_evdev_defbinds[];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue