diff --git a/input/drivers_hid/btstack_hid.c b/input/drivers_hid/btstack_hid.c index 575d656598..5d4f018473 100644 --- a/input/drivers_hid/btstack_hid.c +++ b/input/drivers_hid/btstack_hid.c @@ -623,8 +623,6 @@ void bt_send_rfcomm(uint16_t rfcom_cid, uint8_t *data, uint16_t len); /* custom functions */ -void btpad_set_inquiry_state(bool on); - joypad_connection_t *slots; typedef struct btstack_hid @@ -1025,7 +1023,7 @@ static void btpad_connection_send_control(void *data, bt_send_l2cap_ptr(connection->channels[0], data_buf, size); } -void btpad_set_inquiry_state(bool on) +static void btpad_set_inquiry_state(bool on) { inquiry_off = !on; @@ -1424,6 +1422,7 @@ static void btstack_hid_free(void *data) return; pad_connection_destroy(hid->slots); + btpad_set_inquiry_state(true); if (hid) free(hid); @@ -1442,6 +1441,7 @@ static void *btstack_hid_init(void) goto error; btstack_set_poweron(false); + btpad_set_inquiry_state(false); return hid; diff --git a/ui/drivers/ui_cocoatouch.m b/ui/drivers/ui_cocoatouch.m index 6bda0ac67b..bafb020d09 100644 --- a/ui/drivers/ui_cocoatouch.m +++ b/ui/drivers/ui_cocoatouch.m @@ -37,9 +37,6 @@ static CFRunLoopObserverRef iterate_observer; /* forward declaration */ void apple_rarch_exited(void); -#ifdef HAVE_BTSTACK -void btpad_set_inquiry_state(bool on); -#endif static void rarch_enable_ui(void) { @@ -282,10 +279,6 @@ enum self.mainmenu.last_menu = self.mainmenu; [self pushViewController:self.mainmenu animated:NO]; -#ifdef HAVE_BTSTACK - btpad_set_inquiry_state(false); -#endif - [self refreshSystemConfig]; [self showGameView]; @@ -454,9 +447,6 @@ void apple_rarch_exited(void) if (!ap) return; [ap showPauseMenu:ap]; -#ifdef HAVE_BTSTACK - btpad_set_inquiry_state(true); -#endif } typedef struct ui_companion_cocoatouch