Lines Matching defs:hat_dir
861 case HID_GD_UP: usage->hat_dir = 1; break;
862 case HID_GD_DOWN: usage->hat_dir = 5; break;
863 case HID_GD_RIGHT: usage->hat_dir = 3; break;
864 case HID_GD_LEFT: usage->hat_dir = 7; break;
1431 (usage->hat_min < usage->hat_max || usage->hat_dir)) {
1437 if (usage->hat_dir && !field->dpad)
1546 if (usage->hat_min < usage->hat_max || usage->hat_dir) {
1547 int hat_dir = usage->hat_dir;
1548 if (!hat_dir)
1549 hat_dir = (value - usage->hat_min) * 8 / (usage->hat_max - usage->hat_min + 1) + 1;
1550 if (hat_dir < 0 || hat_dir > 8) hat_dir = 0;
1551 input_event(input, usage->type, usage->code , hid_hat_to_axis[hat_dir].x);
1552 input_event(input, usage->type, usage->code + 1, hid_hat_to_axis[hat_dir].y);