From 83fc61d7b125875b48674da7c9217f0f4154f365 Mon Sep 17 00:00:00 2001 From: Lysann Schlegel Date: Sun, 11 Nov 2012 20:27:29 +0100 Subject: [PATCH] remove debug print when trying to read/write unconnected devices --- src/os_mac/os_mac_interface.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/os_mac/os_mac_interface.m b/src/os_mac/os_mac_interface.m index c6ce72f..b8683d7 100644 --- a/src/os_mac/os_mac_interface.m +++ b/src/os_mac/os_mac_interface.m @@ -163,8 +163,9 @@ int wiiuse_os_poll(struct wiimote_t** wm, int wiimotes) { } int wiiuse_os_read(struct wiimote_t* wm) { - if(!wm || !wm->objc_wm || !WIIMOTE_IS_CONNECTED(wm)) { - WIIUSE_ERROR("Attempting to read from NULL or unconnected Wiimote"); + if(!wm || !wm->objc_wm) return 0; + if(!WIIMOTE_IS_CONNECTED(wm)) { + WIIUSE_ERROR("Attempting to read from unconnected Wiimote"); return 0; } @@ -178,8 +179,9 @@ int wiiuse_os_read(struct wiimote_t* wm) { } int wiiuse_os_write(struct wiimote_t* wm, byte* buf, int len) { - if(!wm || !wm->objc_wm || !WIIMOTE_IS_CONNECTED(wm)) { - WIIUSE_ERROR("Attempting to write to NULL or unconnected Wiimote"); + if(!wm || !wm->objc_wm) return 0; + if(!WIIMOTE_IS_CONNECTED(wm)) { + WIIUSE_ERROR("Attempting to write to unconnected Wiimote"); return 0; }