Skip to content

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++

Trace controlled hook test inputs to diagnose missed dispatch

Veyra Goal Agent09c6db30cca3
diff --git a/include/veyra/ui/GameHotkeys.h b/include/veyra/ui/GameHotkeys.h
index ecf04c95..28c66434 100644
--- a/include/veyra/ui/GameHotkeys.h
+++ b/include/veyra/ui/GameHotkeys.h
@@ -64,6 +64,7 @@ private:
class GameHotkeyListener {
public:
+ void (*testObserver)(unsigned,bool,bool,int) = nullptr;
static constexpr UINT message = WM_APP + 0x347;
~GameHotkeyListener() { stop(); }
void bindings(GameKey panel, GameKey exit) {
@@ -127,6 +128,7 @@ private:
const GameKey panel{unsigned(config & 255), unsigned((config >> 8) & 15)};
const GameKey exit{unsigned((config >> 16) & 255), unsigned((config >> 24) & 15)};
const auto result = self.state_.input(key->vkCode, down, panel, exit, self.panelOwned_.load());
+ if (self.testObserver) self.testObserver(key->vkCode,down,result.consume,result.action);
if (result.action >= 0 && epoch == self.epoch_.load()) PostMessageW(self.target_, message, WPARAM(result.action), LPARAM(epoch));
if (result.consume) return 1;
}
diff --git a/tests/integration/GamePassthroughTests.cpp b/tests/integration/GamePassthroughTests.cpp
index 993d1d20..3871e454 100644
--- a/tests/integration/GamePassthroughTests.cpp
+++ b/tests/integration/GamePassthroughTests.cpp
@@ -6,6 +6,9 @@ using namespace veyra::ui;
namespace {
int failures=0, panels=0, exits=0;
GameHotkeyListener* listener=nullptr;
+struct Trace {unsigned vk=0;bool down=false,consume=false;int action=-1;};
+std::array<Trace,128> trace{};std::atomic<unsigned> traced{0};
+void observe(unsigned vk,bool down,bool consume,int action){if(vk!=VK_F9&&vk!=VK_F10&&vk!=VK_LCONTROL&&vk!=VK_LMENU)return;const auto i=traced.fetch_add(1);if(i<trace.size())trace[i]={vk,down,consume,action};}
void check(bool ok,const char* text){std::cout<<(ok?"PASS ":"FAIL ")<<text<<std::endl;failures+=!ok;}
LRESULT CALLBACK proc(HWND w,UINT m,WPARAM wp,LPARAM lp){
if(m==GameHotkeyListener::message){const bool current=listener&&listener->current(lp);if(current){if(wp==0)++panels;else if(wp==1)++exits;}
@@ -55,7 +58,7 @@ int main(int argc,char** argv){
SetWindowPos(target,nullptr,420,300,720,400,SWP_NOACTIVATE|SWP_NOZORDER);const auto moved=geometry.pictureBounds();
check(moved.left-r.left==70&&moved.top-r.top==20&&moved.right-moved.left==720,"window move and resize keep physical coordinates");
}
- GameHotkeyListener hook;listener=&hook;hook.bindings({VK_F9,0},{VK_F10,3});
+ GameHotkeyListener hook;hook.testObserver=observe;listener=&hook;hook.bindings({VK_F9,0},{VK_F10,3});
check(hook.start(window),"real WH_KEYBOARD_LL installs on its own message thread");hook.panelOwned(true);
if(hook.running()){
check(send({{VK_F9,false},{VK_F9,false},{VK_F9,true}}),"real repeat input delivered");pump(100);
@@ -72,5 +75,6 @@ int main(int argc,char** argv){
check(hook.start(window),"listener can reenter after exit");hook.panelOwned(true);tap(VK_F9);check(panels==4,"new session responds to custom key");hook.stop();
}
listener=nullptr;DestroyWindow(target);DestroyWindow(window);if(IsWindow(previous))SetForegroundWindow(previous);
+ for(unsigned i=0;i<std::min<unsigned>(traced.load(),unsigned(trace.size()));++i){const auto t=trace[i];std::cout<<"TRACE vk="<<t.vk<<" down="<<t.down<<" consume="<<t.consume<<" action="<<t.action<<std::endl;}
std::cout<<"TOTAL failures="<<failures<<std::endl;return failures?1:0;
}