Commited anonymous patch for incorrect x/y buttons on gtk port.
This commit is contained in:
parent
9964b5ad3e
commit
939b5e7a5b
|
@ -61,7 +61,8 @@ void desmume_keypad(u16 k)
|
|||
{
|
||||
unsigned short k_ext = (k >> 10) & 0x3;
|
||||
unsigned short k_pad = k & 0x3FF;
|
||||
((unsigned short *)ARM9Mem.ARM9_REG)[0x130>>1] = ~k_pad;
|
||||
((unsigned short *)MMU.ARM7_REG)[0x130>>1] = ~k_ext;
|
||||
((unsigned short *)ARM9Mem.ARM9_REG)[0x130>>1] = k_pad;
|
||||
((unsigned short *)MMU.ARM7_REG)[0x130>>1] = k_pad;
|
||||
MMU.ARM7_REG[0x136] = (k_ext & 0x3) | (MMU.ARM7_REG[0x136] & ~0x3);
|
||||
}
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
#define DESMUME_KEY_R 9
|
||||
#define DESMUME_KEY_L 10
|
||||
|
||||
#define DESMUME_KEY_Y 11
|
||||
#define DESMUME_KEY_X 12
|
||||
#define DESMUME_KEY_X 11
|
||||
#define DESMUME_KEY_Y 12
|
||||
#define DESMUME_KEY_DEBUG 13
|
||||
|
||||
extern void desmume_init();
|
||||
|
|
|
@ -57,8 +57,8 @@ const char *Ini_Keypad_Values[DESMUME_NB_KEYS] =
|
|||
"KEY_DOWN",
|
||||
"KEY_R",
|
||||
"KEY_L",
|
||||
"KEY_Y",
|
||||
"KEY_X",
|
||||
"KEY_Y",
|
||||
"KEY_DEBUG",
|
||||
};
|
||||
|
||||
|
@ -137,8 +137,8 @@ const gint Default_Keypad_Config[DESMUME_NB_KEYS] =
|
|||
65364,
|
||||
65454, // numeric .
|
||||
65456, // numeric 0
|
||||
121, // y
|
||||
120, // x
|
||||
121, // y
|
||||
112
|
||||
};
|
||||
|
||||
|
@ -407,7 +407,7 @@ static gboolean Stylus_Release(GtkWidget *w, GdkEventButton *e, gpointer data)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static u16 Cur_Keypad = 0;
|
||||
static u16 Cur_Keypad = 0x00FFF;
|
||||
|
||||
static gint Key_Press(GtkWidget *w, GdkEventKey *e)
|
||||
{
|
||||
|
@ -420,7 +420,7 @@ static gint Key_Press(GtkWidget *w, GdkEventKey *e)
|
|||
if(i < DESMUME_NB_KEYS)
|
||||
{
|
||||
Key = DESMUME_KEYMASK_(i);
|
||||
Cur_Keypad |= Key;
|
||||
Cur_Keypad &= ~Key;
|
||||
if(desmume_running()) desmume_keypad(Cur_Keypad);
|
||||
}
|
||||
|
||||
|
@ -438,7 +438,7 @@ static gint Key_Release(GtkWidget *w, GdkEventKey *e)
|
|||
if(i < DESMUME_NB_KEYS)
|
||||
{
|
||||
Key = DESMUME_KEYMASK_(i);
|
||||
Cur_Keypad &= ~Key;
|
||||
Cur_Keypad |= Key;
|
||||
if(desmume_running()) desmume_keypad(Cur_Keypad);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue