Skip to content

Conversation

@akien-mga
Copy link
Member

@akien-mga akien-mga commented Dec 12, 2025

@akien-mga akien-mga added this to the 4.6 milestone Dec 12, 2025
@akien-mga akien-mga requested a review from a team as a code owner December 12, 2025 22:26
@akien-mga akien-mga force-pushed the sdl-3.2.28 branch 3 times, most recently from f78245b to febc79a Compare December 12, 2025 23:02
Comment on lines +153 to +197
/*
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
{" Touchpad", GAMEPAD_BLACKLIST_END}, // "Sony Interactive Entertainment DualSense Wireless Controller Touchpad"

// 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},

{"Synaptics ", GAMEPAD_BLACKLIST_ANYWHERE}, // "Synaptics TM2768-001", "SynPS/2 Synaptics TouchPad"
{"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"
{" LED ", GAMEPAD_BLACKLIST_ANYWHERE}, // "ASRock LED Controller"
{" Thelio ", GAMEPAD_BLACKLIST_ANYWHERE}, // "System76 Thelio Io 2"
};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My addition :D This makes this PR supersede #101260, fix #110906 and #110536

@Nintorch
Copy link
Contributor

Unfortunately, currently I can't test this PR, I should be able to test it on Monday/Thursday, if that's okay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Framework Laptop keyboard modules are detected as joypad devices Joypad inputs stuck to Up and Left when running scenes [4.5-beta5]

2 participants