Add support for more than 4 joystick buttons under MSW

Use polling thread instead of relying on MM_JOYXXX events to allow
receiving events from all the supported buttons.

See https://github.com/wxWidgets/wxWidgets/pull/942

Closes #1142.
This commit is contained in:
Vadim Zeitlin
2018-09-25 01:01:20 +02:00
parent 7872b9fd38
commit a02ed536e6
4 changed files with 152 additions and 113 deletions

View File

@@ -13,6 +13,8 @@
#include "wx/event.h"
class wxJoystickThread;
class WXDLLIMPEXP_ADV wxJoystick: public wxObject
{
wxDECLARE_DYNAMIC_CLASS(wxJoystick);
@@ -22,6 +24,7 @@ public:
*/
wxJoystick(int joystick = wxJOYSTICK1);
virtual ~wxJoystick();
// Attributes
////////////////////////////////////////////////////////////////////////////
@@ -84,7 +87,8 @@ public:
bool ReleaseCapture(void);
protected:
int m_joystick;
int m_joystick;
wxJoystickThread* m_thread;
};
#endif