This is new wiki software and old wiki content. It's a work in progress!
Here's the explanation.
Be gentle, report bugs, leave feedback on pages, or just edit them yourself! Thanks!

SDL Wiki


THIS PAGE IS A WORK IN PROGRESS ... Please make edits to this page to improve it!


Close a game controller previously opened with SDL_GameControllerOpen().


void SDL_GameControllerClose(SDL_GameController *gamecontroller);

Function Parameters


a game controller identifier previously returned by SDL_GameControllerOpen()

Code Examples

/* 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) {
        } else {
            fprintf(stderr, "Could not open gamecontroller %i: %s\n", i, SDL_GetError());

CategoryAPI, CategoryGameController, CategoryDraft

[ 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.