From 9eebbc542e0e1aebd9690852149edd8cd9b23dd3 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Fri, 17 Jan 2020 12:43:42 -0500 Subject: [PATCH] Load gamecontrollerdb.txt if available --- desktop_version/src/FileSystemUtils.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/desktop_version/src/FileSystemUtils.cpp b/desktop_version/src/FileSystemUtils.cpp index 7f37a70e..69b0cf75 100644 --- a/desktop_version/src/FileSystemUtils.cpp +++ b/desktop_version/src/FileSystemUtils.cpp @@ -98,6 +98,13 @@ int FILESYSTEM_init(char *argvZero) ); return 0; } + + strcpy(output, PHYSFS_getBaseDir()); + strcpy(output, "gamecontrollerdb.txt"); + if (SDL_GameControllerAddMappingsFromFile(output) < 0) + { + printf("gamecontrollerdb.txt not found!\n"); + } return 1; }