From a9550ab9f0055bdf452c89ec34a2dd6ad3593dbb Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Fri, 29 Apr 2011 23:05:27 -0500 Subject: [PATCH] change how the bluetooth address is set up on nix Committing changes from dolphin-emu's wiiuse 0.13 --- src/io_nix.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/io_nix.c b/src/io_nix.c index 931ca1e..fddebaf 100644 --- a/src/io_nix.c +++ b/src/io_nix.c @@ -181,13 +181,17 @@ static int wiiuse_connect_single(struct wiimote_t* wm, char* address) { return 0; addr.l2_family = AF_BLUETOOTH; - + bdaddr_t *bdaddr = &wm->bdaddr; if (address) /* use provided address */ str2ba(address, &addr.l2_bdaddr); else + { + bacmp(bdaddr, BDADDR_ANY); /* use address of device discovered */ - addr.l2_bdaddr = wm->bdaddr; + addr.l2_bdaddr = *bdaddr; + + } /* * OUTPUT CHANNEL