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:
parent
414c7ba418
commit
b04303ddc9
21
global.h
21
global.h
@ -984,6 +984,27 @@ GFX2_GLOBAL SDL_Joystick* Joystick;
|
|||||||
/// It was chosen to not conflict with any SDL key number.
|
/// It was chosen to not conflict with any SDL key number.
|
||||||
#define KEY_JOYBUTTON (SDLK_LAST+4)
|
#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__
|
#ifdef __gp2x__
|
||||||
#define KEY_ESC (KEY_JOYBUTTON+GP2X_BUTTON_X)
|
#define KEY_ESC (KEY_JOYBUTTON+GP2X_BUTTON_X)
|
||||||
#else
|
#else
|
||||||
|
|||||||
4
input.c
4
input.c
@ -443,7 +443,7 @@ int Handle_joystick_press(SDL_JoyButtonEvent event)
|
|||||||
Input_new_mouse_K=2;
|
Input_new_mouse_K=2;
|
||||||
return Move_cursor_with_constraints();
|
return Move_cursor_with_constraints();
|
||||||
}
|
}
|
||||||
#ifdef __gp2x__
|
#ifdef __GP2X__
|
||||||
switch(event.button)
|
switch(event.button)
|
||||||
{
|
{
|
||||||
#ifndef NO_JOYCURSOR
|
#ifndef NO_JOYCURSOR
|
||||||
@ -503,7 +503,7 @@ int Handle_joystick_release(SDL_JoyButtonEvent event)
|
|||||||
return Release_control(0,MOD_ALT);
|
return Release_control(0,MOD_ALT);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __gp2x__
|
#ifdef __GP2X__
|
||||||
switch(event.button)
|
switch(event.button)
|
||||||
{
|
{
|
||||||
case GP2X_BUTTON_UP:
|
case GP2X_BUTTON_UP:
|
||||||
|
|||||||
@ -465,7 +465,7 @@ const char * Key_name(word Key)
|
|||||||
|
|
||||||
if (Key>=KEY_JOYBUTTON && Key<=KEY_JOYBUTTON+18)
|
if (Key>=KEY_JOYBUTTON && Key<=KEY_JOYBUTTON+18)
|
||||||
{
|
{
|
||||||
#ifdef __gp2x__
|
#ifdef __GP2X__
|
||||||
|
|
||||||
char *button_name;
|
char *button_name;
|
||||||
switch(Key)
|
switch(Key)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user