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

Cover static capture-window resize independently of QML animation timing

Veyra Goal Agent18c7cabfc729
diff --git a/tests/integration/ScreenCaptureTests.cpp b/tests/integration/ScreenCaptureTests.cpp
index eb38f5c7..8ad252bc 100644
--- a/tests/integration/ScreenCaptureTests.cpp
+++ b/tests/integration/ScreenCaptureTests.cpp
@@ -20,6 +20,8 @@ void check(bool pass,const char* name){std::cout<<"SCREEN "<<name<<" pass="<<pas
void pump(){MSG msg;while(PeekMessageW(&msg,nullptr,0,0,PM_REMOVE)){TranslateMessage(&msg);DispatchMessageW(&msg);}}
LRESULT CALLBACK pattern(HWND w,UINT m,WPARAM wp,LPARAM lp){
if(m==WM_TIMER){InvalidateRect(w,nullptr,FALSE);return 0;}
+ if(m==WM_APP+1){KillTimer(w,1);return 0;}
+ if(m==WM_APP+2){SetTimer(w,1,16,nullptr);return 0;}
if(m==WM_PAINT){PAINTSTRUCT ps;auto dc=BeginPaint(w,&ps);RECT r;GetClientRect(w,&r);
const COLORREF colors[]={RGB(225,30,45),RGB(20,210,70),RGB(25,60,225)};
for(int i=0;i<3;++i){RECT band{r.right*i/3,0,r.right*(i+1)/3,r.bottom};auto brush=CreateSolidBrush(colors[i]);FillRect(dc,&band,brush);DeleteObject(brush);}
@@ -83,6 +85,20 @@ int wmain(int argc,wchar_t** argv){
std::abs(source.info().displayAspect-double(f->width)/f->height)<1e-9,
"portrait resize publishes new DAR and temporal reset flag together");
check(resized&&content(ctx,ring,source,p,f),"portrait resize retains actual RGB content");
+ // A static window cannot rely on an animation to deliver another frame
+ // after the300ms pool debounce. Exercise that source contract directly,
+ // independently of a QML Timer's render-loop wakeups in an inactive window.
+ PostMessageW(child.window,WM_APP+1,0,0);Sleep(80);
+ SetWindowPos(child.window,nullptr,40,40,700,430,SWP_NOZORDER);
+ end=GetTickCount64()+4000;bool staticResized=false;
+ while(GetTickCount64()<end&&next(source,p,&f)){
+ if(f->width>f->height&&f->width>600){staticResized=true;break;}
+ }
+ check(staticResized&&pipeline::hasFrameFlag(p.flags,pipeline::FrameFlagBits::Resize)&&
+ source.info().width==unsigned(f->width)&&source.info().height==unsigned(f->height)&&
+ std::abs(source.info().displayAspect-double(f->width)/f->height)<1e-9,
+ "static window resize updates real frame metadata without ongoing animation");
+ PostMessageW(child.window,WM_APP+2,0,0);
source.close();options.left=30;options.right=30;options.top=20;options.bottom=20;desc.path=options.uri();check(source.open(desc)&&next(source,p,&f)&&f->width<820,"cropped source opens");source.close();
options.left=options.right=options.top=options.bottom=0;
options.fps=0;check(source::ScreenCaptureOptions::parse(options.uri(),parsed)&&parsed.fps==0,"automatic rate URI round trip");