|
@ -19,11 +19,12 @@ |
|
|
|
|
|
|
|
|
// NOTE: Gamepad name ID depends on drivers and OS |
|
|
// NOTE: Gamepad name ID depends on drivers and OS |
|
|
#if defined(PLATFORM_RPI) |
|
|
#if defined(PLATFORM_RPI) |
|
|
#define XBOX360_NAME_ID "Microsoft X-Box 360 pad" |
|
|
|
|
|
#define PS3_NAME_ID "PLAYSTATION(R)3 Controller" |
|
|
|
|
|
|
|
|
#define XBOX360_NAME_ID "Microsoft X-Box 360 pad" |
|
|
|
|
|
#define PS3_NAME_ID "PLAYSTATION(R)3 Controller" |
|
|
#else |
|
|
#else |
|
|
#define XBOX360_NAME_ID "Xbox 360 Controller" |
|
|
|
|
|
#define PS3_NAME_ID "PLAYSTATION(R)3 Controller" |
|
|
|
|
|
|
|
|
#define XBOX360_NAME_ID "Xbox 360 Controller" |
|
|
|
|
|
#define XBOX360_LEGACY_NAME_ID "Xbox Controller" |
|
|
|
|
|
#define PS3_NAME_ID "PLAYSTATION(R)3 Controller" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
int main(void) |
|
|
int main(void) |
|
@ -61,7 +62,7 @@ int main(void) |
|
|
{ |
|
|
{ |
|
|
DrawText(TextFormat("GP1: %s", GetGamepadName(GAMEPAD_PLAYER1)), 10, 10, 10, BLACK); |
|
|
DrawText(TextFormat("GP1: %s", GetGamepadName(GAMEPAD_PLAYER1)), 10, 10, 10, BLACK); |
|
|
|
|
|
|
|
|
if (IsGamepadName(GAMEPAD_PLAYER1, XBOX360_NAME_ID)) |
|
|
|
|
|
|
|
|
if (IsGamepadName(GAMEPAD_PLAYER1, XBOX360_NAME_ID) || IsGamepadName(GAMEPAD_PLAYER1, XBOX360_LEGACY_NAME_ID)) |
|
|
{ |
|
|
{ |
|
|
DrawTexture(texXboxPad, 0, 0, DARKGRAY); |
|
|
DrawTexture(texXboxPad, 0, 0, DARKGRAY); |
|
|
|
|
|
|
|
@ -191,4 +192,4 @@ int main(void) |
|
|
//-------------------------------------------------------------------------------------- |
|
|
//-------------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
|
|
|
|
|
|
} |