Skip to content

Commit

Permalink
Fix issues when disconnecting wii remote
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjay900 committed Oct 13, 2023
1 parent 3ad0007 commit c860124
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/fake_wiimote.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -326,7 +327,6 @@ int fake_wiimote_disconnect(fake_wiimote_t *wiimote)
0, 0x13 /* User Ended Connection */);
}

wiimote->active = false;

return ret;
}
Expand Down

0 comments on commit c860124

Please sign in to comment.