From 5fcf2ea49ac69aee053dc32550fc67f69b860e17 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 23 Dec 2023 10:57:34 +0100 Subject: [PATCH] The SDL error message is now printed to the log if a controller could not be added --- es-core/src/InputManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/es-core/src/InputManager.cpp b/es-core/src/InputManager.cpp index 580a56da8..7ae99d955 100644 --- a/es-core/src/InputManager.cpp +++ b/es-core/src/InputManager.cpp @@ -635,7 +635,8 @@ void InputManager::addControllerByDeviceIndex(Window* window, int deviceIndex) SDL_GameController* controller {SDL_GameControllerOpen(deviceIndex)}; if (controller == nullptr) { - LOG(LogError) << "Couldn't add controller with device index " << deviceIndex; + LOG(LogError) << "Couldn't add controller with device index " << deviceIndex << " (" + << SDL_GetError() << ")"; return; }