diff --git a/src/platform_sdl.c b/src/platform_sdl.c index 5fc5e0b..851b19a 100755 --- a/src/platform_sdl.c +++ b/src/platform_sdl.c @@ -418,6 +418,10 @@ int main(int argc, char *argv[]) { system_cleanup(); platform_video_cleanup(); + if (gamepad) { + SDL_GameControllerClose(gamepad); + } + if (sdl_path_assets) { SDL_free(sdl_path_assets); }