#pragma section-numbers off #pragma camelcase off || DRAFT|| ##*^*^*^*^*See http://wiki.libsdl.org/moin.cgi/SGFunctions for details on editing this page*^*^*^*^* = SDL_GameControllerClose = Use this function to close a game controller previously opened with [[SDL_GameControllerOpen]](). <> == Syntax == {{{#!highlight cpp void SDL_GameControllerClose(SDL_GameController* gamecontroller) }}} == Function Parameters == ||'''gamecontroller'''||a game controller identifier previously returned by [[SDL_GameControllerOpen]]()|| == Code Examples == {{{#!highlight cpp /* Attempt to open every controller. */ for (int i = 0; i < SDL_NumJoysticks(); ++i) { if (SDL_IsGameController(i)) { SDL_GameController *controller = SDL_GameControllerOpen(i); if (controller) { SDL_GameControllerClose(controller); } else { fprintf(stderr, "Could not open gamecontroller %i: %s\n", i, SDL_GetError()); } } } }}} == Remarks == ''You can add useful comments here'' ##Leave this section as-is unless you have a remark to put in. In that case, replace ''You can add useful comments here'' with your remark(s) following the Style Guide instructions. Leave the rest of the markup alone and delete this comment. == Related Functions == .[[SDL_GameControllerOpen]] ---- [[CategoryAPI]], [[CategoryGameController]] ##See the Style Guide for instructions on editing the footer.