Revision: 45700
http://sourceforge.net/p/vice-emu/code/45700
Author: dqh
Date: 2025-06-14 05:14:56 +0000 (Sat, 14 Jun 2025)
Log Message:
-----------
Fixed macOS build (currently no host joystick support)
Modified Paths:
--------------
trunk/vice/configure.ac
trunk/vice/src/arch/gtk3/joystickdrv/joystick_osx.c
trunk/vice/src/machine.c
trunk/vice/src/vicefeatures.c
Modified: trunk/vice/configure.ac
===================================================================
--- trunk/vice/configure.ac 2025-06-13 23:12:26 UTC (rev 45699)
+++ trunk/vice/configure.ac 2025-06-14 05:14:56 UTC (rev 45700)
@@ -469,7 +469,6 @@
HAVE_SYS_AUDIO_H_SUPPORT="no "
HAVE_ZLIB_SUPPORT="no "
LINUX_JOYSTICK_SUPPORT="no "
-MAC_JOYSTICK_SUPPORT="no "
USE_ALSA_SUPPORT="no "
USE_COREAUDIO_SUPPORT="no "
USE_DMEDIA_SUPPORT="no "
@@ -2130,9 +2129,7 @@
[IOHIDManagerCreate(NULL,0)],
[AC_MSG_RESULT(yes);
JOY_LIBS="-framework IOKit -framework CoreServices";
- MAC_JOYSTICK_SUPPORT="yes";
HAS_HIDMGR_SUPPORT="yes";
- AC_DEFINE(MAC_JOYSTICK,,[Enable Mac Joystick support.])
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS joystick_osx.o";
],
[AC_MSG_RESULT(no);
Modified: trunk/vice/src/arch/gtk3/joystickdrv/joystick_osx.c
===================================================================
--- trunk/vice/src/arch/gtk3/joystickdrv/joystick_osx.c 2025-06-13 23:12:26 UTC (rev 45699)
+++ trunk/vice/src/arch/gtk3/joystickdrv/joystick_osx.c 2025-06-14 05:14:56 UTC (rev 45700)
@@ -324,11 +324,11 @@
&e,
&value, 1) >= 0) {
if (value < e.min_pvalue*3/4 + e.max_pvalue/4) {
- joy_axis_event(joyport, e.ordinal, JOY_AXIS_NEGATIVE);
+ // joy_axis_event(joyport, e.ordinal, JOY_AXIS_NEGATIVE);
} else if (value > e.min_pvalue/4 + e.max_pvalue*3/4) {
- joy_axis_event(joyport, e.ordinal, JOY_AXIS_POSITIVE);
+ // joy_axis_event(joyport, e.ordinal, JOY_AXIS_POSITIVE);
} else {
- joy_axis_event(joyport, e.ordinal, JOY_AXIS_MIDDLE);
+ // joy_axis_event(joyport, e.ordinal, JOY_AXIS_MIDDLE);
}
}
break;
@@ -356,13 +356,13 @@
}
if (value >= 0 && value <= MAX_HAT_MAP_INDEX) {
- joy_hat_event(joyport, e.ordinal, hat_map[value]);
+ // joy_hat_event(joyport, e.ordinal, hat_map[value]);
}
}
}
} else if (e.usage_page == kHIDPage_Button) {
if (joy_hidlib_get_value(device, &e, &value, 0) >= 0) {
- joy_button_event(joyport, e.ordinal, value);
+ // joy_button_event(joyport, e.ordinal, value);
}
}
}
@@ -377,8 +377,8 @@
}
static joystick_driver_t osx_joystick_driver = {
- .poll = osx_joystick_read,
- .close = osx_joystick_close
+// .poll = osx_joystick_read,
+// .close = osx_joystick_close
};
static CFDictionaryRef CreateHIDDeviceMatchDictionary(const int page, const int usage)
@@ -405,7 +405,7 @@
/* ----- API ----- */
-void joy_hidlib_init(void)
+void joystick_arch_init(void)
{
if ( !mgr ) {
/* create the manager */
@@ -478,7 +478,7 @@
d->product_id = (int)product_id;
d->product_name = product_name;
joy_hidlib_enumerate_elements(d, &axes, &buttons, &hats);
- register_joystick_driver(&osx_joystick_driver, product_name, d, axes, buttons, hats);
+// register_joystick_driver(&osx_joystick_driver, product_name, d, axes, buttons, hats);
}
}
lib_free(all_devices);
@@ -485,7 +485,7 @@
CFRelease( device_set );
}
-void joy_hidlib_exit(void)
+void joystick_arch_shutdown(void)
{
if(mgr) {
IOHIDManagerClose( mgr, 0 );
Modified: trunk/vice/src/machine.c
===================================================================
--- trunk/vice/src/machine.c 2025-06-13 23:12:26 UTC (rev 45699)
+++ trunk/vice/src/machine.c 2025-06-14 05:14:56 UTC (rev 45700)
@@ -375,9 +375,6 @@
autostart_shutdown();
joystick_close();
-#ifdef MAC_JOYSTICK
- joy_hidlib_exit();
-#endif
#if !defined(USE_HEADLESSUI)
joystick_arch_shutdown();
#endif
Modified: trunk/vice/src/vicefeatures.c
===================================================================
--- trunk/vice/src/vicefeatures.c 2025-06-13 23:12:26 UTC (rev 45699)
+++ trunk/vice/src/vicefeatures.c 2025-06-14 05:14:56 UTC (rev 45700)
@@ -357,14 +357,6 @@
1 },
#endif
#endif
-#ifdef MACOS_COMPILE /* (osx) */
- { "MAC_JOYSTICK", "Enable Mac Joystick support.",
-#ifndef MAC_JOYSTICK
- 0 },
-#else
- 1 },
-#endif
-#endif
#if defined(UNIX_COMPILE) /* (unix) */
{ "USE_ALSA", "Enable ALSA support.",
#ifndef USE_ALSA
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|