[PATCH] winex11.drv: Handle button events without axes.
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Tue Nov 19 04:49:45 CST 2019
Hi John
On 19/11/19 4:39 pm, John Chadwick wrote:
> - gMsgPacket.pkX = button->axis_data[0];
> - gMsgPacket.pkY = button->axis_data[1];
> + if (button->axes_count > 0) {
> + gMsgPacket.pkX = button->axis_data[0];
> + gMsgPacket.pkY = button->axis_data[1];
> + } else {
> + gMsgPacket.pkX = last_packet.pkX;
> + gMsgPacket.pkY = last_packet.pkY;
> + }
> gMsgPacket.pkOrientation.orAzimuth = figure_deg(button->axis_data[3],button->axis_data[4]);
> gMsgPacket.pkOrientation.orAltitude = ((1000 - 15 * max(abs(button->axis_data[3]),
> abs(button->axis_data[4])))
pkOrientation and pkNormalPressure will also need to be put in the if
condition.
Regards
Alistair Leslie-Hughes
More information about the wine-devel
mailing list