SDL Wiki
(This is the legacy documentation for stable SDL2, the current stable version; SDL3 is the current development version.)

SDL_GameControllerFromPlayerIndex

Get the SDL_GameController associated with a player index.

Syntax

SDL_GameController* SDL_GameControllerFromPlayerIndex(int player_index);

Function Parameters

player_index the player index, which is not the device index or the instance id!

Return Value

Returns the SDL_GameController associated with a player index.

Remarks

Please note that the player index is not the device index, nor is it the instance id!

Version

This function is available since SDL 2.0.12.


CategoryAPI


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.