diff --git a/source/fake_wiimote.c b/source/fake_wiimote.c index 6d3d56c..051aca1 100644 --- a/source/fake_wiimote.c +++ b/source/fake_wiimote.c @@ -315,6 +315,7 @@ int fake_wiimote_disconnect(fake_wiimote_t *wiimote) { int ret = 0; + wiimote->active = false; /* Unassign the currently assigned input device (if any) */ if (wiimote->input_device) input_device_release_wiimote(wiimote->input_device); @@ -326,7 +327,6 @@ int fake_wiimote_disconnect(fake_wiimote_t *wiimote) 0, 0x13 /* User Ended Connection */); } - wiimote->active = false; return ret; }