X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f50de1504e002ba3afac3491c8b4817870c850d8..7d09b97f5321d0accd758eb420c008853ad9ec26:/src/unix/joystick.cpp?ds=sidebyside diff --git a/src/unix/joystick.cpp b/src/unix/joystick.cpp index eda239978d..92e36ad5d7 100644 --- a/src/unix/joystick.cpp +++ b/src/unix/joystick.cpp @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "joystick.h" -#endif - // for compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -32,6 +28,7 @@ #include "wx/event.h" #include "wx/window.h" +#include "wx/unix/private.h" enum { wxJS_AXIS_X = 0, @@ -91,7 +88,7 @@ void* wxJoystickThread::Entry() fd_set read_fds; struct timeval time_out = {0, 0}; - FD_ZERO(&read_fds); + wxFD_ZERO(&read_fds); while (true) { if (TestDestroy()) @@ -104,9 +101,9 @@ void* wxJoystickThread::Entry() else time_out.tv_usec = 10 * 1000; // check at least every 10 msec in blocking case - FD_SET(m_device, &read_fds); + wxFD_SET(m_device, &read_fds); select(m_device+1, &read_fds, NULL, NULL, &time_out); - if (FD_ISSET(m_device, &read_fds)) + if (wxFD_ISSET(m_device, &read_fds)) { memset(&j_evt, 0, sizeof(j_evt)); read(m_device, &j_evt, sizeof(j_evt)); @@ -286,7 +283,7 @@ bool wxJoystick::IsOk() const return (m_device != -1); } -int wxJoystick::GetNumberJoysticks() const +int wxJoystick::GetNumberJoysticks() { wxString dev_name; int fd, j;