cpp-remapper
cpp-remapper copied to clipboard
Support async
- add a co_await runner to profiles
- support async lambdas and mappers
This is to allow:
- running other stuff in the main profile run loop, e.g. a webserver
- a nicer API for running stuff with a delay -
co_await winrt::resume_after(std::chrono::milliseconds(100));
- most things (including DirectInput) can boil down to a waitable HANDLE, then
WaitForMultipleObjects() - timers can either be implemented via
CreateWaitableTimer()+SetWaitableTimer(), or by keeping track of them and using the timeout forWaitForMultipleObjects() - if windows are created (eg for a system tray icon), the event loop must run in the thread that owns the window, and use
MsgWaitForMultipleObjects()