X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=ginge.git;a=blobdiff_plain;f=loader%2Fhost_wiz.c;h=7763f35fdcecd4cda1fa76cedc9edbfd9467788b;hp=59b5dec76138d74506d3a9ec1162c227d20090b5;hb=3ef07128a8ad8a12688beee244c5e0a2629581de;hpb=ad439e71e25f709a1e2b6f72f36119432593f34a diff --git a/loader/host_wiz.c b/loader/host_wiz.c index 59b5dec..7763f35 100644 --- a/loader/host_wiz.c +++ b/loader/host_wiz.c @@ -1,4 +1,9 @@ -// vim:shiftwidth=2:expandtab +/* + * GINGE - GINGE Is Not Gp2x Emulator + * (C) notaz, 2010-2011 + * + * This work is licensed under the MAME license, see COPYING file for details. + */ #include #include #include @@ -12,7 +17,7 @@ extern int memdev, probably_caanoo; // leasing from wiz_video #define BTN_JOY BTN_JOYSTICK -struct in_default_bind in_evdev_defbinds[] = { +static struct in_default_bind wiz_evdev_defbinds[] = { { KEY_UP, IN_BINDTYPE_PLAYER12, GP2X_UP }, { KEY_DOWN, IN_BINDTYPE_PLAYER12, GP2X_DOWN }, { KEY_LEFT, IN_BINDTYPE_PLAYER12, GP2X_LEFT }, @@ -30,6 +35,10 @@ struct in_default_bind in_evdev_defbinds[] = { { 0, 0, 0 } }; +static const struct in_pdata wiz_evdev_pdata = { + .defbinds = wiz_evdev_defbinds, +}; + // todo: rm when generic code works on Wiz #if 0 static int gpiodev = -1; @@ -128,3 +137,10 @@ static void host_actions(int actions[IN_BINDTYPE_COUNT]) actions[IN_BINDTYPE_PLAYER12] = act; } } + +static void host_init_input(void) +{ + in_evdev_init(&wiz_evdev_pdata); +} + +// vim:shiftwidth=2:expandtab