In my UWP project I am using CoreDispatcher.ProcessEvents function like mentioned in https://github.com/microsoft/Windows-universal-samples/blob/main/Samples/LowLatencyInput/
I want to convert it for WinUI3. But I got stuck to mimic behavior of coreInput->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessOneAndAllPending);
Code that is used in my UWP project is provided below:
while (CanRun)
{
inputSource->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessOneAndAllPending);
if (!CanRun) break;
DoSomeOperation();
}
But inputSource->Dispatcher->ProcessEvents is not available for WinUI3.
How to mimic same behavior in C++/WinRT for WinUI3 Project.