From 03f8528315fa46c95991a34f3325d7b33ae5538c Mon Sep 17 00:00:00 2001
From: Edward Rudd <urkle@outoforder.cc>
Date: Sat, 02 May 2020 21:48:36 +0000
Subject: [PATCH] Update source to SDL2 2.0.12

---
 source/src/joystick/sort_controllers.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/source/src/joystick/sort_controllers.py b/source/src/joystick/sort_controllers.py
index 32f065a..c078e2c 100755
--- a/source/src/joystick/sort_controllers.py
+++ b/source/src/joystick/sort_controllers.py
@@ -11,6 +11,7 @@
 parsing_controllers = False
 controllers = []
 controller_guids = {}
+sdk_conditionals = []
 split_pattern = re.compile(r'([^"]*")([^,]*,)([^,]*,)([^"]*)(".*)')
 
 def save_controller(line):
@@ -24,12 +25,15 @@
     entry.append(match.group(5))
     controllers.append(entry)
 
+    if ',sdk' in line:
+        sdk_conditionals.append(entry[1])
+
 def write_controllers():
     global controllers
     global controller_guids
     # Check for duplicates
     for entry in controllers:
-        if (entry[1] in controller_guids):
+        if (entry[1] in controller_guids and entry[1] not in sdk_conditionals):
             current_name = entry[2]
             existing_name = controller_guids[entry[1]][2]
             print("Warning: entry '%s' is duplicate of entry '%s'" % (current_name, existing_name))

--
Gitblit v1.9.3