Repository: libsdl-org/SDL
File: src/joystick/SDL_gamepad.c (C)

Code before:
    false
};
static SDL_vidpid_list SDL_ignored_gamepads = {
    SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES, 0, 0, NULL,
    NULL, 0, 0, NULL,
    0, NULL,
    false
};

/*
    List of words in gamepad names that indicate that the gamepad should not be detected.
    See also `initial_blacklist_devices` in SDL_joystick.c
*/

enum SDL_GamepadBlacklistWordsPosition {
    GAMEPAD_BLACKLIST_BEGIN,
    GAMEPAD_BLACKLIST_END,
    GAMEPAD_BLACKLIST_ANYWHERE,
};

struct SDL_GamepadBlacklistWords {
    const char* str;
    enum SDL_GamepadBlacklistWordsPosition pos;
};

static struct SDL_GamepadBlacklistWords SDL_gamepad_blacklist_words[] = {
#ifdef SDL_PLATFORM_LINUX
    {" Motion Sensors", GAMEPAD_BLACKLIST_END}, // Don't treat the PS3 and PS4 motion controls as a separate gamepad
    {" IMU",            GAMEPAD_BLACKLIST_END}, // Don't treat the Nintendo IMU as a separate gamepad

    // Don't treat the Wii extension controls as a separate gamepad
    {" Accelerometer",  GAMEPAD_BLACKLIST_END},
    {" IR",             GAMEPAD_BLACKLIST_END},
    {" Motion Plus",    GAMEPAD_BLACKLIST_END},
    {" Nunchuk",        GAMEPAD_BLACKLIST_END},
#endif

    // The Google Pixel fingerprint sensor, as well as other fingerprint sensors, reports itself as a joystick
    {"uinput-",         GAMEPAD_BLACKLIST_BEGIN},

    {" TouchPad",       GAMEPAD_BLACKLIST_END}, // "SynPS/2 Synaptics TouchPad"
    {" Touchpad",       GAMEPAD_BLACKLIST_END}, // "Sony Interactive Entertainment DualSense Wireless Controller Touchpad"
    {"Synaptics ",      GAMEPAD_BLACKLIST_BEGIN}, // "Synaptics TM2768-001"
    {"Trackpad",        GAMEPAD_BLACKLIST_ANYWHERE},
    {"Clickpad",        GAMEPAD_BLACKLIST_ANYWHERE},
    // "PG-90215 Keyboard", "Usb Keyboard Usb Keyboard Consumer Control", "Framework Laptop 16 Keyboard Module - ISO System Control"
    {" Keyboard",       GAMEPAD_BLACKLIST_ANYWHERE},
    {" Laptop ",        GAMEPAD_BLACKLIST_ANYWHERE}, // "Framework Laptop 16 Numpad Module System Control"
    {"Mouse ",          GAMEPAD_BLACKLIST_BEGIN}, // "Mouse passthrough"
    {" Pen",            GAMEPAD_BLACKLIST_END}, // "Wacom One by Wacom S Pen"
    {" Finger",         GAMEPAD_BLACKLIST_END}, // "Wacom HID 495F Finger"

Review comment (suggestion):
```suggestion
static const struct SDL_GamepadBlacklistWords SDL_gamepad_blacklist_words[] = {
```

Code after:
    false
};
static SDL_vidpid_list SDL_ignored_gamepads = {
    SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES, 0, 0, NULL,
    NULL, 0, 0, NULL,
    0, NULL,
    false
};

/*
    List of words in gamepad names that indicate that the gamepad should not be detected.
    See also `initial_blacklist_devices` in SDL_joystick.c
*/

enum SDL_GamepadBlacklistWordsPosition {
    GAMEPAD_BLACKLIST_BEGIN,
    GAMEPAD_BLACKLIST_END,
    GAMEPAD_BLACKLIST_ANYWHERE,
};

struct SDL_GamepadBlacklistWords {
    const char* str;
    enum SDL_GamepadBlacklistWordsPosition pos;
};

static const struct SDL_GamepadBlacklistWords SDL_gamepad_blacklist_words[] = {
#ifdef SDL_PLATFORM_LINUX
    {" Motion Sensors", GAMEPAD_BLACKLIST_END}, // Don't treat the PS3 and PS4 motion controls as a separate gamepad
    {" IMU",            GAMEPAD_BLACKLIST_END}, // Don't treat the Nintendo IMU as a separate gamepad

    // Don't treat the Wii extension controls as a separate gamepad
    {" Accelerometer",  GAMEPAD_BLACKLIST_END},
    {" IR",             GAMEPAD_BLACKLIST_END},
    {" Motion Plus",    GAMEPAD_BLACKLIST_END},
    {" Nunchuk",        GAMEPAD_BLACKLIST_END},
#endif

    // The Google Pixel fingerprint sensor, as well as other fingerprint sensors, reports itself as a joystick
    {"uinput-",         GAMEPAD_BLACKLIST_BEGIN},

    {" TouchPad",       GAMEPAD_BLACKLIST_END}, // "SynPS/2 Synaptics TouchPad"
    {" Touchpad",       GAMEPAD_BLACKLIST_END}, // "Sony Interactive Entertainment DualSense Wireless Controller Touchpad"
    {"Synaptics ",      GAMEPAD_BLACKLIST_BEGIN}, // "Synaptics TM2768-001"
    {"Trackpad",        GAMEPAD_BLACKLIST_ANYWHERE},
    {"Clickpad",        GAMEPAD_BLACKLIST_ANYWHERE},
    // "PG-90215 Keyboard", "Usb Keyboard Usb Keyboard Consumer Control", "Framework Laptop 16 Keyboard Module - ISO System Control"
    {" Keyboard",       GAMEPAD_BLACKLIST_ANYWHERE},
    {" Laptop ",        GAMEPAD_BLACKLIST_ANYWHERE}, // "Framework Laptop 16 Numpad Module System Control"
    {"Mouse ",          GAMEPAD_BLACKLIST_BEGIN}, // "Mouse passthrough"
    {" Pen",            GAMEPAD_BLACKLIST_END}, // "Wacom One by Wacom S Pen"
    {" Finger",         GAMEPAD_BLACKLIST_END}, // "Wacom HID 495F Finger"