X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=gp2x%2Fin_gp2x.c;h=8066ca7ef9e7b65963365ea1967b166489a4c3ee;hb=d572cbad9886a04f8c51edb825dc6aaec9b02e23;hp=213b3d4ac8a16f210ff70aa5d06517be897f1faf;hpb=9c0d458840d6eb0216232eabd3ca29b57f638c92;p=libpicofe.git diff --git a/gp2x/in_gp2x.c b/gp2x/in_gp2x.c index 213b3d4..8066ca7 100644 --- a/gp2x/in_gp2x.c +++ b/gp2x/in_gp2x.c @@ -3,6 +3,7 @@ #include "../common/input.h" #include "in_gp2x.h" +#include "soc.h" #define IN_PREFIX "gp2x:" #define IN_GP2X_NBUTTONS 32 @@ -12,8 +13,6 @@ 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, @@ -43,6 +42,7 @@ static int in_gp2x_get_bind_count(void) 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;