diff --git a/examples/core/core_input_gamepad.c b/examples/core/core_input_gamepad.c index 656f7c244f83..a9c8b0bb8d1c 100644 --- a/examples/core/core_input_gamepad.c +++ b/examples/core/core_input_gamepad.c @@ -20,9 +20,9 @@ #include "raylib.h" // NOTE: Gamepad name ID depends on drivers and OS -#define XBOX360_LEGACY_NAME_ID "Xbox Controller" -#define XBOX360_NAME_ID "Xbox 360 Controller" -#define PS3_NAME_ID "Sony PLAYSTATION(R)3 Controller" +#define XBOX_ALIAS_1 "xbox" +#define XBOX_ALIAS_2 "x-box" +#define PS3_NAME_ID "Sony PLAYSTATION(R)3 Controller" //------------------------------------------------------------------------------------ // Program main entry point @@ -67,7 +67,7 @@ int main(void) { DrawText(TextFormat("GP%d: %s", gamepad, GetGamepadName(gamepad)), 10, 10, 10, BLACK); - if (TextIsEqual(GetGamepadName(gamepad), XBOX360_LEGACY_NAME_ID) || TextIsEqual(GetGamepadName(gamepad), XBOX360_NAME_ID)) + if (TextFindIndex(TextToLower(GetGamepadName(gamepad)), XBOX_ALIAS_1) > -1 || TextFindIndex(TextToLower(GetGamepadName(gamepad)), XBOX_ALIAS_2) > -1) { DrawTexture(texXboxPad, 0, 0, DARKGRAY);