mirror of
https://github.com/godotengine/godot.git
synced 2025-11-02 22:51:08 +00:00
Fix trackpads and graphics tablets being recognized as controllers on Linux/*BSD
This commit is contained in:
parent
b75f0485ba
commit
724cdffc8c
2 changed files with 21 additions and 0 deletions
|
|
@ -374,6 +374,12 @@ void JoypadLinux::open_joypad(const char *p_path) {
|
|||
name = namebuf;
|
||||
}
|
||||
|
||||
for (const String &word : name.to_lower().split(" ")) {
|
||||
if (banned_words.has(word)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (ioctl(fd, EVIOCGID, &inpid) < 0) {
|
||||
close(fd);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue