Wait for device updates to complete in cli.cpp rather than just a fixed 1 second wait

This commit is contained in:
Adam Honse committed 2026-10-15 11:55:15 -05:00
1 parent 6c8a6a9125
commit 6a10f77c15
3 files changed
+73 -1

No files matched your search

+10 -1
View File
@@ -1968,7 +1968,16 @@ unsigned int cli_post_detection()
}
}
std::this_thread::sleep_for(1s);
/*-----------------------------------------------------*\
| Wait for each controller's device thread to finish |
| applying queued updates to hardware before returning |
| so that the updates are not dropped when the |
| controllers shut down |
\*-----------------------------------------------------*/
for(std::size_t controller_idx = 0; controller_idx < rgb_controllers.size(); controller_idx++)
{
rgb_controllers[controller_idx]->WaitForDeviceUpdate();
}
return 0;
}