diff options
| author | Rob Messick | 2014-02-23 12:20:27 -0800 |
|---|---|---|
| committer | Rob Messick | 2014-02-23 12:20:27 -0800 |
| commit | fd03693df1a7e86ce6fef7f077398deb91e81e95 (patch) | |
| tree | fe7fa83f97da72f5be5311c5370469228e0a1bf0 | |
| parent | 0109fb42955d4250870d93c2b35e8a1db9aed934 (diff) | |
| download | godot-fd03693df1a7e86ce6fef7f077398deb91e81e95.tar.gz godot-fd03693df1a7e86ce6fef7f077398deb91e81e95.tar.zst godot-fd03693df1a7e86ce6fef7f077398deb91e81e95.zip | |
Only include linux/joystick.h on linux
| -rw-r--r-- | platform/x11/os_x11.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index d95818b4a..2d536f231 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -45,7 +45,10 @@ #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> + +#ifdef __linux__ #include <linux/joystick.h> +#endif //stupid linux.h #ifdef KEY_TAB @@ -1031,7 +1034,6 @@ void OS_X11::close_joystick(int p_id) { }; void OS_X11::probe_joystick(int p_id) { - if (p_id == -1) { for (int i=0; i<JOYSTICKS_MAX; i++) { @@ -1073,7 +1075,6 @@ void OS_X11::move_window_to_foreground() { } void OS_X11::process_joysticks() { - int bytes; js_event events[32]; InputEvent ievent; |
