mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-09-27 22:30:52 +08:00
Fixed Ipega controllers being ignored in keyboard mode (thanks @AntTheAlchemist!)
This commit is contained in:
@@ -206,7 +206,7 @@ static const struct SDL_GamepadBlacklistWords SDL_gamepad_blacklist_words[] = {
|
|||||||
{"Synaptics ", GAMEPAD_BLACKLIST_ANYWHERE}, // "Synaptics TM2768-001", "SynPS/2 Synaptics TouchPad"
|
{"Synaptics ", GAMEPAD_BLACKLIST_ANYWHERE}, // "Synaptics TM2768-001", "SynPS/2 Synaptics TouchPad"
|
||||||
{"Trackpad", GAMEPAD_BLACKLIST_ANYWHERE},
|
{"Trackpad", GAMEPAD_BLACKLIST_ANYWHERE},
|
||||||
{"Clickpad", GAMEPAD_BLACKLIST_ANYWHERE},
|
{"Clickpad", GAMEPAD_BLACKLIST_ANYWHERE},
|
||||||
// "PG-90215 Keyboard", "Usb Keyboard Usb Keyboard Consumer Control", "Framework Laptop 16 Keyboard Module - ISO System Control"
|
// "Usb Keyboard Usb Keyboard Consumer Control", "Framework Laptop 16 Keyboard Module - ISO System Control"
|
||||||
{" Keyboard", GAMEPAD_BLACKLIST_ANYWHERE},
|
{" Keyboard", GAMEPAD_BLACKLIST_ANYWHERE},
|
||||||
{" Laptop ", GAMEPAD_BLACKLIST_ANYWHERE}, // "Framework Laptop 16 Numpad Module System Control"
|
{" Laptop ", GAMEPAD_BLACKLIST_ANYWHERE}, // "Framework Laptop 16 Numpad Module System Control"
|
||||||
{"Mouse ", GAMEPAD_BLACKLIST_BEGIN}, // "Mouse passthrough"
|
{"Mouse ", GAMEPAD_BLACKLIST_BEGIN}, // "Mouse passthrough"
|
||||||
@@ -3281,6 +3281,10 @@ bool SDL_ShouldIgnoreGamepad(Uint16 vendor_id, Uint16 product_id, Uint16 version
|
|||||||
|
|
||||||
case GAMEPAD_BLACKLIST_ANYWHERE:
|
case GAMEPAD_BLACKLIST_ANYWHERE:
|
||||||
if (SDL_strstr(name, blacklist_word->str) != NULL) {
|
if (SDL_strstr(name, blacklist_word->str) != NULL) {
|
||||||
|
if (SDL_startswith(name, "PG-") {
|
||||||
|
// Ipega gamepads have modes with keyboard keys in addition to gamepad controls
|
||||||
|
break;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user