mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
refactoring for Wiz port; random cleanups
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@703 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
e54507e856
commit
4217134398
18 changed files with 531 additions and 492 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue