feat: add profiled DualSense PCM haptics experiment
This commit is contained in:
parent
3b1366067b
commit
0c626fb3b3
29 changed files with 4469 additions and 5 deletions
|
|
@ -584,3 +584,30 @@ index 67841e8..9fe7134 100644
|
|||
d->report_parser.set_lightbar_color = uni_hid_parser_psmove_set_lightbar_color;
|
||||
d->report_parser.play_dual_rumble = uni_hid_parser_psmove_play_dual_rumble;
|
||||
logi("Device detected as PS Move: 0x%02x\n", type);
|
||||
diff --git a/src/components/bluepad32/bt/uni_bt.c b/src/components/bluepad32/bt/uni_bt.c
|
||||
--- a/src/components/bluepad32/bt/uni_bt.c
|
||||
+++ b/src/components/bluepad32/bt/uni_bt.c
|
||||
@@ -73,6 +73,12 @@
|
||||
#include "uni_log.h"
|
||||
#include "uni_property.h"
|
||||
|
||||
+#ifdef SWITCH_PICO_HAPTICS_EXPERIMENT
|
||||
+// The opt-in PCM sender owns its CAN_SEND_NOW event, not the generic HID FIFO.
|
||||
+extern bool uni_platform_on_l2cap_can_send_now(uni_hid_device_t* device,
|
||||
+ uint16_t local_cid);
|
||||
+#endif
|
||||
+
|
||||
// globals
|
||||
bd_addr_t uni_local_bd_addr;
|
||||
|
||||
@@ -473,6 +479,10 @@ void uni_bt_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t* pack
|
||||
if (device == NULL) {
|
||||
loge("--->>> CANNOT FIND DEVICE");
|
||||
} else {
|
||||
+#ifdef SWITCH_PICO_HAPTICS_EXPERIMENT
|
||||
+ if (uni_platform_on_l2cap_can_send_now(device, local_cid))
|
||||
+ break;
|
||||
+#endif
|
||||
uni_hid_device_send_queued_reports(device);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue