diff options
| author | Konrad Gutvik Grande <[email protected]> | 2024-06-07 10:21:02 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-07 10:21:02 +0200 |
| commit | 3948656d84da2e02ba4c2fda80ac813f6c81813e (patch) | |
| tree | 8c21fa9e1244f97d4de8903216fc1ea5873a8cc1 | |
| parent | f05316b11d0a1b17088e3e75e4682e2e7ce54b91 (diff) | |
| download | raylib-3948656d84da2e02ba4c2fda80ac813f6c81813e.tar.gz raylib-3948656d84da2e02ba4c2fda80ac813f6c81813e.zip | |
The example always showed a xbox controller, never a ps3 controller (#4040)
| -rw-r--r-- | examples/core/core_input_gamepad.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/core/core_input_gamepad.c b/examples/core/core_input_gamepad.c index 843d5d90..656f7c24 100644 --- a/examples/core/core_input_gamepad.c +++ b/examples/core/core_input_gamepad.c @@ -22,7 +22,7 @@ // 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 "PLAYSTATION(R)3 Controller" +#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 (true) + if (TextIsEqual(GetGamepadName(gamepad), XBOX360_LEGACY_NAME_ID) || TextIsEqual(GetGamepadName(gamepad), XBOX360_NAME_ID)) { DrawTexture(texXboxPad, 0, 0, DARKGRAY); |
