From 146603c3f42976b2e1349e06def99614158b20ce Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Thu, 29 Jan 2026 13:20:19 +0200 Subject: [PATCH] Prevent SDL layouts from being created if a layout already exists --- .../InputSystem/Plugins/Linux/SDLDeviceBuilder.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/Linux/SDLDeviceBuilder.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/Linux/SDLDeviceBuilder.cs index 7a322361ae..cbc4d584cd 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/Linux/SDLDeviceBuilder.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/Linux/SDLDeviceBuilder.cs @@ -16,6 +16,11 @@ internal class SDLLayoutBuilder internal static string OnFindLayoutForDevice(ref InputDeviceDescription description, string matchedLayout, InputDeviceExecuteCommandDelegate executeCommandDelegate) { + // If the system found a matching layout, there's nothing for us to do. + if (!string.IsNullOrEmpty(matchedLayout)) + return null; + + // If the device isn't an SDL joystick, we have nothing to do. if (description.interfaceName != LinuxSupport.kInterfaceName) return null;