Lines Matching refs:hat_dir
815 case HID_GD_UP: usage->hat_dir = 1; break;
816 case HID_GD_DOWN: usage->hat_dir = 5; break;
817 case HID_GD_RIGHT: usage->hat_dir = 3; break;
818 case HID_GD_LEFT: usage->hat_dir = 7; break;
1416 (usage->hat_min < usage->hat_max || usage->hat_dir)) {
1422 if (usage->hat_dir && !field->dpad)
1531 if (usage->hat_min < usage->hat_max || usage->hat_dir) {
1532 int hat_dir = usage->hat_dir;
1533 if (!hat_dir)
1534 hat_dir = (value - usage->hat_min) * 8 / (usage->hat_max - usage->hat_min + 1) + 1;
1535 if (hat_dir < 0 || hat_dir > 8) hat_dir = 0;
1536 input_event(input, usage->type, usage->code , hid_hat_to_axis[hat_dir].x);
1537 input_event(input, usage->type, usage->code + 1, hid_hat_to_axis[hat_dir].y);