Skip to content

Commit

Permalink
retroarch: bluetooth: add pairable on to pairing steps
Browse files Browse the repository at this point in the history
  • Loading branch information
ToKe79 committed Apr 2, 2022
1 parent ef0cb1e commit bf9c840
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/bluetooth/drivers/bluetoothctl.c b/bluetooth/drivers/bluetoothctl.c
index f3205c8ee9..31f5a24447 100644
--- a/bluetooth/drivers/bluetoothctl.c
+++ b/bluetooth/drivers/bluetoothctl.c
@@ -170,8 +170,7 @@ static bool bluetoothctl_connect_device(void *data, unsigned idx)
string_list_free(list);

snprintf(btctl->command, sizeof(btctl->command), "\
- bluetoothctl -- trust %s",
- device);
+ bluetoothctl -- pairable on");

pclose(popen(btctl->command, "r"));

@@ -181,6 +180,12 @@ static bool bluetoothctl_connect_device(void *data, unsigned idx)

pclose(popen(btctl->command, "r"));

+ snprintf(btctl->command, sizeof(btctl->command), "\
+ bluetoothctl -- trust %s",
+ device);
+
+ pclose(popen(btctl->command, "r"));
+
snprintf(btctl->command, sizeof(btctl->command), "\
bluetoothctl -- connect %s",
device);

0 comments on commit bf9c840

Please sign in to comment.