Lines Matching defs:hat_dir
705 case HID_GD_UP: usage->hat_dir = 1; break;
706 case HID_GD_DOWN: usage->hat_dir = 5; break;
707 case HID_GD_RIGHT: usage->hat_dir = 3; break;
708 case HID_GD_LEFT: usage->hat_dir = 7; break;
1224 (usage->hat_min < usage->hat_max || usage->hat_dir)) {
1230 if (usage->hat_dir && !field->dpad)
1312 if (usage->hat_min < usage->hat_max || usage->hat_dir) {
1313 int hat_dir = usage->hat_dir;
1314 if (!hat_dir)
1315 hat_dir = (value - usage->hat_min) * 8 / (usage->hat_max - usage->hat_min + 1) + 1;
1316 if (hat_dir < 0 || hat_dir > 8) hat_dir = 0;
1317 input_event(input, usage->type, usage->code , hid_hat_to_axis[hat_dir].x);
1318 input_event(input, usage->type, usage->code + 1, hid_hat_to_axis[hat_dir].y);