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

Commit 9ffcb64

Browse files
committed
[HACK] Workaround for OSX compile error on joystick
1 parent 0334856 commit 9ffcb64

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

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

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

307-
static void osx_joystick_read(int joyport, void* priv) {
307+
// static void osx_joystick_read(int joyport, void* priv) {
308+
static void osx_joystick_read(void* priv) {
308309
joy_hid_device_t *device = priv;
309310
int i;
310311
int value;
@@ -324,11 +325,14 @@ static void osx_joystick_read(int joyport, void* priv) {
324325
&e,
325326
&value, 1) >= 0) {
326327
if (value < e.min_pvalue*3/4 + e.max_pvalue/4) {
327-
joy_axis_event(joyport, e.ordinal, JOY_AXIS_NEGATIVE);
328+
/* joy_axis_event(joyport, e.ordinal, JOY_AXIS_NEGATIVE); */
329+
joy_axis_event(e.ordinal, JOY_AXIS_NEGATIVE);
328330
} else if (value > e.min_pvalue/4 + e.max_pvalue*3/4) {
329-
joy_axis_event(joyport, e.ordinal, JOY_AXIS_POSITIVE);
331+
/* joy_axis_event(joyport, e.ordinal, JOY_AXIS_POSITIVE); */
332+
joy_axis_event(e.ordinal, JOY_AXIS_POSITIVE);
330333
} else {
331-
joy_axis_event(joyport, e.ordinal, JOY_AXIS_MIDDLE);
334+
/* joy_axis_event(joyport, e.ordinal, JOY_AXIS_MIDDLE); */
335+
joy_axis_event(e.ordinal, JOY_AXIS_MIDDLE);
332336
}
333337
}
334338
break;
@@ -356,13 +360,15 @@ static void osx_joystick_read(int joyport, void* priv) {
356360
}
357361

358362
if (value >= 0 && value <= MAX_HAT_MAP_INDEX) {
359-
joy_hat_event(joyport, e.ordinal, hat_map[value]);
363+
/* joy_hat_event(joyport, e.ordinal, hat_map[value]); */
364+
joy_hat_event(e.ordinal, hat_map[value]);
360365
}
361366
}
362367
}
363368
} else if (e.usage_page == kHIDPage_Button) {
364369
if (joy_hidlib_get_value(device, &e, &value, 0) >= 0) {
365-
joy_button_event(joyport, e.ordinal, value);
370+
/* joy_button_event(joyport, e.ordinal, value); */
371+
joy_button_event(e.ordinal, value);
366372
}
367373
}
368374
}

0 commit comments

Comments
 (0)