Set Z-position correctly for wxEVT_JOY_ZMOVE events.
Z-move events don't have (x, y) position, but they do have Z-position which needs to be set. Also don't use (x, y) position for these events in the sample. See #748. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -5950,7 +5950,10 @@ bool wxWindowMSW::HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags)
|
||||
}
|
||||
|
||||
wxJoystickEvent event(eventType, buttons, joystick, change);
|
||||
event.SetPosition(wxPoint(x, y));
|
||||
if ( eventType == wxEVT_JOY_ZMOVE )
|
||||
event.SetZPosition(x);
|
||||
else
|
||||
event.SetPosition(wxPoint(x, y));
|
||||
event.SetEventObject(this);
|
||||
|
||||
return HandleWindowEvent(event);
|
||||
|
Reference in New Issue
Block a user