change how the bluetooth address is set up on nix

Committing changes from dolphin-emu's wiiuse 0.13
This commit is contained in:
Ryan Pavlik
2011-04-29 23:05:27 -05:00
parent 7c45e68198
commit a9550ab9f0

View File

@@ -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