Some fixes for gp2x, the define is actually uppercase.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@842 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues 2009-06-06 21:11:47 +00:00
parent 414c7ba418
commit b04303ddc9
3 changed files with 24 additions and 3 deletions

View File

@ -984,6 +984,27 @@ GFX2_GLOBAL SDL_Joystick* Joystick;
/// It was chosen to not conflict with any SDL key number.
#define KEY_JOYBUTTON (SDLK_LAST+4)
/// Button definitions for the gp2x
#define GP2X_BUTTON_UP (0)
#define GP2X_BUTTON_DOWN (4)
#define GP2X_BUTTON_LEFT (2)
#define GP2X_BUTTON_RIGHT (6)
#define GP2X_BUTTON_UPLEFT (1)
#define GP2X_BUTTON_UPRIGHT (7)
#define GP2X_BUTTON_DOWNLEFT (3)
#define GP2X_BUTTON_DOWNRIGHT (5)
#define GP2X_BUTTON_CLICK (18)
#define GP2X_BUTTON_A (12)
#define GP2X_BUTTON_B (13)
#define GP2X_BUTTON_Y (14)
#define GP2X_BUTTON_X (15)
#define GP2X_BUTTON_L (10)
#define GP2X_BUTTON_R (11)
#define GP2X_BUTTON_START (8)
#define GP2X_BUTTON_SELECT (9)
#define GP2X_BUTTON_VOLUP (16)
#define GP2X_BUTTON_VOLDOWN (17)
#ifdef __gp2x__
#define KEY_ESC (KEY_JOYBUTTON+GP2X_BUTTON_X)
#else

View File

@ -443,7 +443,7 @@ int Handle_joystick_press(SDL_JoyButtonEvent event)
Input_new_mouse_K=2;
return Move_cursor_with_constraints();
}
#ifdef __gp2x__
#ifdef __GP2X__
switch(event.button)
{
#ifndef NO_JOYCURSOR
@ -503,7 +503,7 @@ int Handle_joystick_release(SDL_JoyButtonEvent event)
return Release_control(0,MOD_ALT);
}
#ifdef __gp2x__
#ifdef __GP2X__
switch(event.button)
{
case GP2X_BUTTON_UP:

View File

@ -465,7 +465,7 @@ const char * Key_name(word Key)
if (Key>=KEY_JOYBUTTON && Key<=KEY_JOYBUTTON+18)
{
#ifdef __gp2x__
#ifdef __GP2X__
char *button_name;
switch(Key)