Skip to content

Commit 2878692

Browse files
committed
Merge branch 'clean' into main
2 parents 0886d78 + 3476966 commit 2878692

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,6 @@ static void scan_axes(joystick_device_t *joydev, struct libevdev *evdev)
336336
if (info != NULL) {
337337
axis->minimum = info->minimum;
338338
axis->maximum = info->maximum;
339-
/* FIXME: Workaround for bug #2161 (should be fixed one layer above) */
340-
axis->digital = (info->minimum == -1) && (info->maximum == 1);
341339
}
342340
/* joydev takes ownership of axis */
343341
joystick_device_add_axis(joydev, axis);

vice/src/joyport/joystick.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4041,13 +4041,17 @@ void joystick_device_add_axis(joystick_device_t *joydev,
40414041
sizeof *joydev->axes * (size_t)joydev->max_axes);
40424042
}
40434043

4044+
/* Digital axis detection */
4045+
axis->digital = (axis->minimum == -1 && axis->maximum == 1);
4046+
40444047
/* set default calibration */
40454048
joystick_calibration_default_for_axis(axis);
40464049
#if 0
4047-
printf("AXIS %d: min: %d, N-threshold: %d, P-threshold: %d, max: %d\n",
4050+
printf("AXIS %d: min: %d, N-threshold: %d, P-threshold: %d, max: %d, digital: %d\n",
40484051
joydev->num_axes,
40494052
axis->minimum, axis->calibration.threshold.negative,
4050-
axis->calibration.threshold.positive, axis->maximum);
4053+
axis->calibration.threshold.positive, axis->maximum,
4054+
axis->digital);
40514055
#endif
40524056
/* store parent device */
40534057
axis->device = joydev;

0 commit comments

Comments
 (0)