Fix: setting IR to off before handshake completes used to enable it anyway.
Fix via Harald <Gotterdammerung@web.de>
This commit is contained in:
6
src/ir.c
6
src/ir.c
@@ -74,8 +74,10 @@ void wiiuse_set_ir(struct wiimote_t* wm, int status) {
|
|||||||
* again to actually enable IR.
|
* again to actually enable IR.
|
||||||
*/
|
*/
|
||||||
if (!WIIMOTE_IS_SET(wm, WIIMOTE_STATE_HANDSHAKE_COMPLETE)) {
|
if (!WIIMOTE_IS_SET(wm, WIIMOTE_STATE_HANDSHAKE_COMPLETE)) {
|
||||||
WIIUSE_DEBUG("Tried to enable IR, will wait until handshake finishes.");
|
if(status) {
|
||||||
WIIMOTE_ENABLE_STATE(wm, WIIMOTE_STATE_IR);
|
WIIUSE_DEBUG("Tried to enable IR, will wait until handshake finishes.");
|
||||||
|
WIIMOTE_ENABLE_STATE(wm, WIIMOTE_STATE_IR);
|
||||||
|
} // else ignoring request to turn off, since it's turned off by default
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user