From c8bf7c82f78cdd2c335810a8ec22a62e1906c40f Mon Sep 17 00:00:00 2001 From: BeWorld <36823759+BeWorld2018@users.noreply.github.com> Date: Thu, 31 Aug 2023 12:57:31 +0200 Subject: [PATCH] Add SDL_GameContrllerClose Fix memory leak --- src/platform_sdl.c | 4 ++++ 1 file changed, 4 insertions(+) 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); }