Bring PS5 GTA6 to 120FPS with DLSS 5. An advanced Windows video player and capture enhancement tool featuring real-time preview for videos, images, and capture card sources. Combine AI-powered Super Resolution, DLSS5 image enhancement, and Frame Generation to deliver a next-generation visual experience.
C++
Keep receiver pumping during controlled native input tests
Veyra Goal Agentf07001391652
diff --git a/include/veyra/ui/GameHotkeys.h b/include/veyra/ui/GameHotkeys.hindex 28c66434..a8b4b72d 100644--- a/include/veyra/ui/GameHotkeys.h+++ b/include/veyra/ui/GameHotkeys.h@@ -88,10 +88,7 @@ public:const HHOOK hook = SetWindowsHookExW(WH_KEYBOARD_LL, callback, GetModuleHandleW(nullptr), 0);running_.store(hook != nullptr); ready.set_value(hook != nullptr);if (hook) {- // Raw-input/low-level-hook notifications can already have- // been observed by PeekMessage without being removed. Wake- // for input still available, not only a newly changed bit.- while (MsgWaitForMultipleObjectsEx(1, &stopEvent_, INFINITE, QS_ALLINPUT, MWMO_INPUTAVAILABLE) == WAIT_OBJECT_0 + 1) {+ while (MsgWaitForMultipleObjects(1, &stopEvent_, FALSE, INFINITE, QS_ALLINPUT) == WAIT_OBJECT_0 + 1) {MSG msg; while (PeekMessageW(&msg, nullptr, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessageW(&msg); }}UnhookWindowsHookEx(hook);diff --git a/tests/integration/GamePassthroughTests.cpp b/tests/integration/GamePassthroughTests.cppindex 3871e454..f1dffb14 100644--- a/tests/integration/GamePassthroughTests.cpp+++ b/tests/integration/GamePassthroughTests.cpp@@ -17,7 +17,13 @@ LRESULT CALLBACK proc(HWND w,UINT m,WPARAM wp,LPARAM lp){}void pump(unsigned ms){const auto end=GetTickCount64()+ms;do{MSG m;while(PeekMessageW(&m,nullptr,0,0,PM_REMOVE)){TranslateMessage(&m);DispatchMessageW(&m);}Sleep(1);}while(GetTickCount64()<end);}bool key(WORD vk,bool up=false){INPUT i{};i.type=INPUT_KEYBOARD;i.ki.wVk=vk;i.ki.dwFlags=up?KEYEVENTF_KEYUP:0;return SendInput(1,&i,sizeof(i))==1;}-bool send(std::initializer_list<std::pair<WORD,bool>> keys){bool ok=true;for(auto [vk,up]:keys)ok=key(vk,up)&&ok;return ok;}+bool send(std::initializer_list<std::pair<WORD,bool>> keys){+ // Do not block the receiving window's message pump inside SendInput. In+ // particular, unclaimed input must be able to finish the native hook chain.+ bool ok=true;std::atomic<bool> done{false};+ std::thread sender([&]{for(auto [vk,up]:keys)ok=key(vk,up)&&ok;done.store(true);});+ while(!done.load())pump(1);sender.join();pump(20);return ok;+}void tap(WORD vk){check(send({{vk,false},{vk,true}}),"SendInput reaches our test foreground");pump(80);}}int main(int argc,char** argv){