From 47cc5e1782b8829de31ae4ee506a0118f1acc7e4 Mon Sep 17 00:00:00 2001 From: Alain Williams Date: Sun, 28 Jun 2026 18:45:57 +0200 Subject: [PATCH] sys_usbd: don't passthrough a real device when its emulation is enabled (macOS) On macOS libusb cannot claim HID interfaces, so passing through a real controller that also has an emulated implementation yields a non-functional device that silently overrides the user's emulated-device setting (the emulated setup only fills slots not already passed through). The game then binds the dead passthrough device and reports no controller. On macOS, skip passthrough for a device when the user has enabled its emulation. Co-Authored-By: Claude Opus 4.8 --- rpcs3/Emu/Cell/lv2/sys_usbd.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rpcs3/Emu/Cell/lv2/sys_usbd.cpp b/rpcs3/Emu/Cell/lv2/sys_usbd.cpp index b84e3457cf..1362d106b5 100644 --- a/rpcs3/Emu/Cell/lv2/sys_usbd.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_usbd.cpp @@ -391,6 +391,17 @@ void usb_handler_thread::perform_scan() && desc.idProduct >= entry.id_product_min && desc.idProduct <= entry.id_product_max) { +#ifdef __APPLE__ + // On macOS, libusb cannot claim HID interfaces, so passing through a real + // controller that also has an emulated implementation yields a non-functional + // device and silently overrides the user's emulated-device setting (the emulated + // setup below only fills slots not already passed through). Prefer the emulated + // implementation whenever the user has enabled it. (e.g. DJ Hero Turntable) + if (entry.make_instance && entry.max_device_count && entry.max_device_count() > 0) + { + continue; + } +#endif sys_usbd.success("Found device: %s", std::basic_string(entry.device_name)); libusb_ref_device(dev); std::shared_ptr usb_dev = std::make_shared(dev, desc, get_new_location());