SDL: sort_controllers.py: fixed parsing SDL_PRIVATE_GAMEPAD_DEFINITIONS

From c099d0525ed04ea6e02ef179a858074aa877ed56 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 30 Oct 2024 05:21:59 -0700
Subject: [PATCH] sort_controllers.py: fixed parsing
 SDL_PRIVATE_GAMEPAD_DEFINITIONS

---
 src/joystick/sort_controllers.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/joystick/sort_controllers.py b/src/joystick/sort_controllers.py
index 5a9a228a15ec0..19aec8987eecc 100755
--- a/src/joystick/sort_controllers.py
+++ b/src/joystick/sort_controllers.py
@@ -146,6 +146,9 @@ def write_controllers():
         elif (line.startswith("#if")):
             print(f"Parsing {line.strip()}")
             output.write(line)
+        elif ("SDL_PRIVATE_GAMEPAD_DEFINITIONS" in line):
+            write_controllers()
+            output.write(line)
         elif (line.startswith("#endif")):
             write_controllers()
             output.write(line)