diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 71f8c00e3e..1563040026 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -960,6 +960,7 @@ if (COMPILER=="GCC"): if (os.path.isdir("/usr/PCBSD")): IncDirectory("ALWAYS", "/usr/PCBSD/local/include") LibDirectory("ALWAYS", "/usr/PCBSD/local/lib") + SmartPkgEnable("INOTIFY", "libinotify", ("inotify"), "sys/inotify.h") if GetTarget() != "windows": PkgDisable("DIRECTCAM") @@ -2707,7 +2708,6 @@ def WriteConfigSettings(): dtool_config["IS_FREEBSD"] = '1' dtool_config["PHAVE_ALLOCA_H"] = 'UNDEF' dtool_config["PHAVE_MALLOC_H"] = 'UNDEF' - dtool_config["PHAVE_LINUX_INPUT_H"] = 'UNDEF' dtool_config["HAVE_PROC_CURPROC_FILE"] = '1' dtool_config["HAVE_PROC_CURPROC_MAP"] = '1' dtool_config["HAVE_PROC_CURPROC_CMDLINE"] = '1' @@ -4478,7 +4478,7 @@ if (not RUNTIME): OPTS=['DIR:panda/metalibs/panda', 'BUILDING:PANDA', 'JPEG', 'PNG', 'HARFBUZZ', 'TIFF', 'OPENEXR', 'ZLIB', 'OPENSSL', 'FREETYPE', 'FFTW', 'ADVAPI', 'WINSOCK2', 'SQUISH', 'NVIDIACG', 'VORBIS', 'OPUS', 'WINUSER', 'WINMM', 'WINGDI', 'IPHLPAPI', - 'SETUPAPI'] + 'SETUPAPI', 'INOTIFY'] TargetAdd('panda_panda.obj', opts=OPTS, input='panda.cxx') diff --git a/panda/src/device/evdevInputDevice.cxx b/panda/src/device/evdevInputDevice.cxx index db6285ba19..b609501797 100644 --- a/panda/src/device/evdevInputDevice.cxx +++ b/panda/src/device/evdevInputDevice.cxx @@ -691,6 +691,7 @@ init_device() { _rtrigger_code = -1; } +#ifndef __FreeBSD__ char path[64]; char buffer[256]; const char *parent = ""; @@ -728,6 +729,7 @@ init_device() { } fclose(f); } +#endif // Special-case fix for Xbox 360 Wireless Receiver: the Linux kernel // driver always reports 4 connected gamepads, regardless of the number diff --git a/panda/src/device/linuxInputDeviceManager.cxx b/panda/src/device/linuxInputDeviceManager.cxx index 7b9b9fdf6f..2406e8c839 100644 --- a/panda/src/device/linuxInputDeviceManager.cxx +++ b/panda/src/device/linuxInputDeviceManager.cxx @@ -134,6 +134,7 @@ consider_add_evdev_device(size_t ev_index) { // having read permissions set, but doesn't export all of the features // (notably, force feedback). +#ifndef __FreeBSD__ // We do this by checking for a js# directory inside the sysfs directory. sprintf(path, "/sys/class/input/event%zd/device", ev_index); @@ -168,6 +169,8 @@ consider_add_evdev_device(size_t ev_index) { } closedir(dir); +#endif + return nullptr; }