From f9b4324e2a2365a8d14d781bf9b801d41b318c78 Mon Sep 17 00:00:00 2001 From: EemilAhonen Date: Wed, 26 Feb 2025 04:09:40 +0200 Subject: [PATCH] fix: device rediscovery issue when name changes Fixes a bug where devices found with a different name were not processed when rediscovered with the correct name. The list of found devices is now cleared after each discovery, allowing for proper rediscovery. --- WiimotePair/ViewController.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WiimotePair/ViewController.m b/WiimotePair/ViewController.m index 39de15d..1d97757 100644 --- a/WiimotePair/ViewController.m +++ b/WiimotePair/ViewController.m @@ -95,6 +95,8 @@ - (void)deviceInquiryDeviceFound:(IOBluetoothDeviceInquiry*)sender device:(IOBluetoothDevice*)device { // Skip unsupported devices. if (![device.name containsString:@"Nintendo RVL-CNT-01"]) { + // Clear devices to enable rediscovery if the name changes. + [_deviceInquiry clearFoundDevices]; return; }