From 71724460f509f31e324a58b44d1521f394e11266 Mon Sep 17 00:00:00 2001 From: Sylvain Gadrat Date: Wed, 1 Dec 2021 17:07:51 +0100 Subject: [PATCH] fix loading of keyboard mapping for controllers > 1 --- src/drivers/Qt/sdl-joystick.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/Qt/sdl-joystick.cpp b/src/drivers/Qt/sdl-joystick.cpp index a076f6e6..a2eb333a 100644 --- a/src/drivers/Qt/sdl-joystick.cpp +++ b/src/drivers/Qt/sdl-joystick.cpp @@ -31,6 +31,7 @@ //#include //#include #include +#include //#define MAX_JOYSTICKS 32 @@ -414,7 +415,7 @@ int GamePad_t::init(int port, const char *guid, const char *profile) // If we get to this point and still have not found a // game controller, then load default keyboard. - if ((portNum == 0) && (devIdx < 0)) + if ((portNum == 0 || strnlen(profile, 1) > 0) && (devIdx < 0)) { if (loadProfile(profile)) {