Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.

Commit a7a0259

Browse files
committed
Revert "[HACK] Workaround for OSX compile error on joystick"
This reverts commit 9ffcb64.
1 parent 58cfa81 commit a7a0259

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

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

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,7 @@ static int joy_hidlib_get_value(joy_hid_device_t *device,
304304
}
305305
}
306306

307-
// static void osx_joystick_read(int joyport, void* priv) {
308-
static void osx_joystick_read(void* priv) {
307+
static void osx_joystick_read(int joyport, void* priv) {
309308
joy_hid_device_t *device = priv;
310309
int i;
311310
int value;
@@ -325,14 +324,11 @@ static void osx_joystick_read(void* priv) {
325324
&e,
326325
&value, 1) >= 0) {
327326
if (value < e.min_pvalue*3/4 + e.max_pvalue/4) {
328-
/* joy_axis_event(joyport, e.ordinal, JOY_AXIS_NEGATIVE); */
329-
joy_axis_event(e.ordinal, JOY_AXIS_NEGATIVE);
327+
joy_axis_event(joyport, e.ordinal, JOY_AXIS_NEGATIVE);
330328
} else if (value > e.min_pvalue/4 + e.max_pvalue*3/4) {
331-
/* joy_axis_event(joyport, e.ordinal, JOY_AXIS_POSITIVE); */
332-
joy_axis_event(e.ordinal, JOY_AXIS_POSITIVE);
329+
joy_axis_event(joyport, e.ordinal, JOY_AXIS_POSITIVE);
333330
} else {
334-
/* joy_axis_event(joyport, e.ordinal, JOY_AXIS_MIDDLE); */
335-
joy_axis_event(e.ordinal, JOY_AXIS_MIDDLE);
331+
joy_axis_event(joyport, e.ordinal, JOY_AXIS_MIDDLE);
336332
}
337333
}
338334
break;
@@ -360,15 +356,13 @@ static void osx_joystick_read(void* priv) {
360356
}
361357

362358
if (value >= 0 && value <= MAX_HAT_MAP_INDEX) {
363-
/* joy_hat_event(joyport, e.ordinal, hat_map[value]); */
364-
joy_hat_event(e.ordinal, hat_map[value]);
359+
joy_hat_event(joyport, e.ordinal, hat_map[value]);
365360
}
366361
}
367362
}
368363
} else if (e.usage_page == kHIDPage_Button) {
369364
if (joy_hidlib_get_value(device, &e, &value, 0) >= 0) {
370-
/* joy_button_event(joyport, e.ordinal, value); */
371-
joy_button_event(e.ordinal, value);
365+
joy_button_event(joyport, e.ordinal, value);
372366
}
373367
}
374368
}

0 commit comments

Comments
 (0)