Commit e8450816 authored by Vojtech Pavlik's avatar Vojtech Pavlik

[PATCH] Fixes needed to get Logitech WingMan 3D running

Some fixes from Johann Deneux:
  Fixes needed to get WingMan Force 3D running. (Fix in fixp_cos
  and hid_init_reports).
parent 94d8a6be
......@@ -66,7 +66,13 @@ inline fixp_t fixp_new16(s16 a)
inline fixp_t fixp_cos(unsigned int degrees)
{
int quadrant = (degrees / 90) & 3;
unsigned int i = (degrees % 90) >> 1;
unsigned int i = degrees % 90;
if (quadrant == 1 || quadrant == 3) {
i = 89 - i;
}
i >>= 1;
return (quadrant == 1 || quadrant == 2)? -cos_table[i] : cos_table[i];
}
......
......@@ -1281,10 +1281,8 @@ void hid_init_reports(struct hid_device *hid)
usb_unlink_urb(hid->urbout);
}
if (err) {
if (err)
warn("timeout initializing reports\n");
return;
}
report_enum = hid->report_enum + HID_INPUT_REPORT;
list = report_enum->report_list.next;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment