diff --git a/board/recalbox/fsoverlay/recalbox/scripts/es_input.rng b/board/recalbox/fsoverlay/recalbox/scripts/es_input.rng
index 6f228cb576866115327827341f32e93becb8badf..92643d4ba575a4181dab7ac2b017f80e6cae422c 100644
--- a/board/recalbox/fsoverlay/recalbox/scripts/es_input.rng
+++ b/board/recalbox/fsoverlay/recalbox/scripts/es_input.rng
@@ -32,6 +32,8 @@
+
+
diff --git a/board/recalbox/fsoverlay/recalbox/share_init/system/.emulationstation/es_input.cfg b/board/recalbox/fsoverlay/recalbox/share_init/system/.emulationstation/es_input.cfg
index 566bd016dd017e70acc1bf7439a7d4b3eceebd14..8eff0a2ac8e78d93b3bf5148c84ac310536f0e83 100644
--- a/board/recalbox/fsoverlay/recalbox/share_init/system/.emulationstation/es_input.cfg
+++ b/board/recalbox/fsoverlay/recalbox/share_init/system/.emulationstation/es_input.cfg
@@ -75,7 +75,7 @@
-
+
@@ -92,7 +92,7 @@
-
+
@@ -104,7 +104,7 @@
-
+
@@ -128,7 +128,7 @@
-
+
diff --git a/projects/frontend/es-core/src/input/InputManager.cpp b/projects/frontend/es-core/src/input/InputManager.cpp
index f31034640865964b34dd76a98df51cad949ffbaf..2f473db9110699ca59589d0e51e67ba57eec0d8c 100644
--- a/projects/frontend/es-core/src/input/InputManager.cpp
+++ b/projects/frontend/es-core/src/input/InputManager.cpp
@@ -448,7 +448,7 @@ bool InputManager::LookupDeviceXmlConfiguration(InputDevice& device)
{
// check the guid
bool guid;
- if (strlen(item.attribute("deviceName").value()) == 0) {
+ if (String(item.attribute("version").value()) == "2") {
// sdl 2.26+
guid = (strcmp(device.GUID().c_str(), item.attribute("deviceGUID").value()) == 0) || device.IsKeyboard();
}else {
@@ -493,7 +493,7 @@ void InputManager::WriteDeviceXmlConfiguration(InputDevice& device)
if (root != nullptr)
for (pugi::xml_node item = root.child("inputConfig"); item != nullptr; item = item.next_sibling("inputConfig"))
{
- if (strlen(item.attribute("deviceName").value()) == 0) {
+ if (String(item.attribute("version").value()) == "2") {
// new kind for nameless entry (sdl2.26+)
if (strcmp(device.GUID().c_str(), item.attribute("deviceGUID").value()) == 0 &&
device.AxeCount() == item.attribute("deviceNbAxes").as_int() &&
@@ -503,7 +503,7 @@ void InputManager::WriteDeviceXmlConfiguration(InputDevice& device)
root.remove_child(item);
break;
}
- }else {
+ } else {
// old kind for nameful entry (sdl2.0)
String CRC = String::ToHexa(gen_crc16((uint8_t*)item.attribute("deviceName").value(), strlen(item.attribute("deviceName").value()), true), 4, String::Hexa::None);
String tempGUID = "";