2 * GINGE - GINGE Is Not Gp2x Emulator
3 * (C) notaz, 2010-2011,2015
5 * This work is licensed under the MAME license, see COPYING file for details.
7 #define _GNU_SOURCE 1 // for plat.c
10 #include <linux/input.h>
12 #include "../common/libpicofe/input.h"
13 #include "../common/libpicofe/linux/in_evdev.h"
16 #include "realfuncs.h"
18 // must be affected by realfuncs.h
19 #include "../common/libpicofe/input.c"
20 #include "../common/libpicofe/linux/plat.c"
21 #include "../common/libpicofe/linux/in_evdev.c"
40 int host_read_btns(void)
42 int actions[IN_BINDTYPE_COUNT] = { 0, };
45 host_actions(actions);
47 return actions[IN_BINDTYPE_PLAYER12];
50 void host_forced_exit(int status)
52 // exit() might not be enough because loader and app data is out of sync,
53 // and other threads (which are really processes on this old glibc used)
54 // might not exit properly.
57 printf("forced exit...\n");
60 snprintf(cmd, sizeof(cmd), "killall %s", g_argv[0]);
63 snprintf(cmd, sizeof(cmd), "killall -9 %s", g_argv[0]);
69 // vim:shiftwidth=2:expandtab