#include "../common/input.h"
#include "in_gp2x.h"
+#include "soc.h"
#define IN_PREFIX "gp2x:"
#define IN_GP2X_NBUTTONS 32
static int in_gp2x_combo_keys = 0;
static int in_gp2x_combo_acts = 0;
-extern volatile unsigned short *gp2x_memregs; /* from minimal library rlyeh */
-
enum { BTN_UP = 0, BTN_LEFT = 2, BTN_DOWN = 4, BTN_RIGHT = 6,
BTN_START = 8, BTN_SELECT = 9, BTN_L = 10, BTN_R = 11,
BTN_A = 12, BTN_B = 13, BTN_X = 14, BTN_Y = 15,
static int in_gp2x_get_gpio_bits(void)
{
#ifndef FAKE_IN_GP2X
+ extern volatile unsigned short *gp2x_memregs;
int value;
value = gp2x_memregs[0x1198>>1] & 0xff; // GPIO M
if (value == 0xFD) value = 0xFA;