diff --git a/src/io_nix.c b/src/io_nix.c index 90cce7a..4eb290e 100644 --- a/src/io_nix.c +++ b/src/io_nix.c @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -75,7 +76,11 @@ int wiiuse_find(struct wiimote_t** wm, int max_wiimotes, int timeout) { /* get the id of the first bluetooth device. */ device_id = hci_get_route(NULL); if (device_id < 0) { - perror("hci_get_route"); + if (errno == ENODEV) { + WIIUSE_ERROR("Could not detect a Bluetooth adapter!"); + } else { + perror("hci_get_route"); + } return 0; }