#pragma section-numbers off #pragma camelcase off || DRAFT|| ##*^*^*^*^*See http://wiki.libsdl.org/moin.cgi/SGFunctions for details on editing this page*^*^*^*^* = SDL_GameControllerName = Use this function to get the implementation dependent name for an opened game controller. <> == Syntax == {{{#!highlight cpp const char* SDL_GameControllerName(SDL_GameController* gamecontroller) }}} == Function Parameters == ||'''gamecontroller'''||a game controller identifier previously returned by [[SDL_GameControllerOpen]]()|| == Return Value == Returns the implementation dependent name for the game controller, or NULL if there is no name or the identifier passed is invalid. == Code Examples == {{{#!highlight cpp SDL_GameController *controller = NULL; for (int i = 0; i < SDL_NumJoysticks(); ++i) { controller = SDL_GameControllerOpen(i); if (controller) { break; } } if (controller) { printf("Found a valid controller, named: %s\n", SDL_GameControllerName(controller)); } }}} == Remarks == This is the same name as returned by [[SDL_GameControllerNameForIndex]](), but it takes a controller identifier instead of the (unstable) device index. == Version == This function is available since SDL 2.0.0. == Related Functions == .[[SDL_GameControllerNameForIndex]] .[[SDL_GameControllerOpen]] ---- [[CategoryAPI]], [[CategoryGameController]] ##See the Style Guide for instructions on editing the footer.