From 4210b45a41af8c08ba0a2423d578cb221a7fcf77 Mon Sep 17 00:00:00 2001 From: Eidolon Date: Thu, 23 Mar 2023 22:56:24 -0500 Subject: [PATCH] Load gamecontroller(_user).txt gamepad mappings --- src/sdl/i_system.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 4a8999cd3..d155a5f93 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -1046,6 +1046,18 @@ void I_StartupInput(void) return; } + { + char dbpath[1024]; + sprintf(dbpath, "%s" PATHSEP "gamecontrollerdb.txt", srb2path); + SDL_GameControllerAddMappingsFromFile(dbpath); + } + + { + char dbpath[1024]; + sprintf(dbpath, "%s" PATHSEP "gamecontrollerdb_user.txt", srb2home); + SDL_GameControllerAddMappingsFromFile(dbpath); + } + // Upon initialization, the gamecontroller subsystem will automatically dispatch controller device added events // for controllers connected before initialization. }