mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 14:43:20 +00:00
Print the gamepad player index when opening a gamepad
This commit is contained in:
parent
17723381da
commit
445f08a0fb
1 changed files with 4 additions and 0 deletions
|
|
@ -995,6 +995,10 @@ static void HandleGamepadAdded(SDL_JoystickID id, SDL_bool verbose)
|
|||
if (SDL_GamepadHasRumbleTriggers(gamepad)) {
|
||||
SDL_Log("Trigger rumble supported");
|
||||
}
|
||||
|
||||
if (SDL_GetGamepadPlayerIndex(gamepad) >= 0) {
|
||||
SDL_Log("Player index: %d\n", SDL_GetGamepadPlayerIndex(gamepad));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < SDL_arraysize(sensors); ++i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue