]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/joystick.cpp
Minor corrections to wxFlexGridSizer ctor documentation.
[wxWidgets.git] / src / unix / joystick.cpp
index f5ad7183461923001ea753618394d541b1e3f042..f9f2ba9d41dd2cafc77c695d0da5ed79d4816c7f 100644 (file)
@@ -21,6 +21,8 @@
     #include "wx/window.h"
 #endif //WX_PRECOMP
 
+#include "wx/thread.h"
+
 #include <linux/joystick.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -100,7 +102,7 @@ void wxJoystickThread::SendEvent(wxEventType type, long ts, int change)
     jwx_event.SetEventObject(m_catchwin);
 
     if (m_catchwin)
-        m_catchwin->AddPendingEvent(jwx_event);
+        m_catchwin->GetEventHandler()->AddPendingEvent(jwx_event);
 }
 
 void* wxJoystickThread::Entry()
@@ -394,7 +396,7 @@ int wxJoystick::GetNumberButtons() const
     if (m_device != -1)
         ioctl(m_device, JSIOCGBUTTONS, &nb);
 
-    if (nb > wxJS_MAX_BUTTONS)
+    if ((int)nb > wxJS_MAX_BUTTONS)
         nb = wxJS_MAX_BUTTONS;
 
     return nb;
@@ -407,7 +409,7 @@ int wxJoystick::GetNumberAxes() const
     if (m_device != -1)
         ioctl(m_device, JSIOCGAXES, &nb);
 
-    if (nb > wxJS_MAX_AXES)
+    if ((int)nb > wxJS_MAX_AXES)
         nb = wxJS_MAX_AXES;
 
     return nb;