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++
Fix settings drafts and coalesce window DPI refresh; verify 1.4.3 package
Veyra Goal Agent139db25be5f9
diff --git a/apps/veyra/SettingsWindow.cpp b/apps/veyra/SettingsWindow.cppindex 3c902d8e..0d7cbb20 100644--- a/apps/veyra/SettingsWindow.cpp+++ b/apps/veyra/SettingsWindow.cpp@@ -16,6 +16,7 @@#include <array>#include <cmath>#include <map>+#include <set>namespace veyra::ui {namespace {HWND window=nullptr,body=nullptr;engine::EngineController* controller=nullptr;HFONT font=nullptr;@@ -46,6 +47,7 @@ struct RowReset {std::wstring tip;};std::map<int,RowReset> rowResets;+std::set<int> editDrafts;void syncRowResets();HWND item(int id){for(auto& entry:items)if(GetDlgCtrlID(entry.h)==id)return entry.h;return nullptr;}LRESULT send(int id,UINT message,WPARAM w=0,LPARAM l=0){return SendMessageW(item(id),message,w,l);}@@ -350,7 +352,8 @@ void syncColorControls(){for(size_t i=0;i<colorParams.size();++i){const float value=colorParams[i].value(colour);const auto text=std::format(L"{:.2f}",value);- if(auto edit=item(colorEditId(int(i))))if(windowText(edit)!=text)putText(colorEditId(int(i)),text.c_str());+ const int editId=colorEditId(int(i));+ if(auto edit=item(editId))if(!editDrafts.contains(editId)&&GetFocus()!=edit&&windowText(edit)!=text)putText(editId,text.c_str());if(auto slider=item(colorSliderId(int(i)))){const int scaled=int(std::lround(value*100.0f));if(SendMessageW(slider,TBM_GETPOS,0,0)!=scaled)SendMessageW(slider,TBM_SETPOS,TRUE,LPARAM(scaled));@@ -858,18 +861,20 @@ bool colourFieldEdited(int index,float value){void message(const std::wstring& text){if(statusSink)statusSink(text);else putText(401,text.c_str());}bool submit(engine::EnhancementSettings s){if(!apply(s)){dirty=true;message(L"修改未接受,请查看状态栏或日志;若总增强正在切换,请稍后重试。");return false;}dirty=false;return true;}void syncProtection(const engine::ProtectionSettings& protection){+ const bool wasPopulating=populating;populating=true;check(206,protection.enabled?BST_CHECKED:BST_UNCHECKED);unsigned count=0;for(auto q:protection.regions)count+=!q.empty();putText(206,(L"NR剔除区 · "+std::to_wstring(count)+L"/4").c_str());// The feather value is stored in working-extent pixels (see// NrResidualComposite.hlsl); the panel only converts it for display.const float feather=std::clamp(protection.featherPixels,0.0f,64.0f);if(auto slider=item(622))SendMessageW(slider,TBM_SETPOS,TRUE,LPARAM(std::lround(feather)));- if(item(222))putText(222,std::to_wstring(int(std::lround(feather))).c_str());+ if(item(222)&&!editDrafts.contains(222)&&GetFocus()!=item(222))putText(222,std::to_wstring(int(std::lround(feather))).c_str());if(auto label=item(1123)){const unsigned extent=controller?controller->snapshot().metrics.resolution.base.height:0u;if(extent>0)putText(1123,std::format(L"羽化 {} px · ≈{:.1f}% 画面高度",int(std::lround(feather)),feather*100.0f/float(extent)).c_str());else putText(1123,std::format(L"羽化 {} px(工作分辨率像素)",int(std::lround(feather))).c_str());}+ populating=wasPopulating;}void selectDiscrete(int group,int value){for(int j=0;j<(group==0?3:2);++j){auto h=item(700+group*10+j);if(j==value)SetPropW(h,L"veyra.selected",HANDLE(1));else RemovePropW(h,L"veyra.selected");InvalidateRect(h,nullptr,FALSE);}}// Multiplier list is capability-driven: the DLSS runtime reports how many@@ -905,7 +910,7 @@ int multiplierChoiceIndex(uint32_t multiplier){for(size_t i=0;i<engine::kFgMultivoid populate(engine::EnhancementSettings s){populating=true;float v[]={s.model.intensity,s.model.tone,s.model.structure,s.model.skin,float(s.model.style),float(s.model.autoMask),float(s.model.uiCorrection),s.residual.total,s.residual.darken,s.residual.brighten,s.residual.color,s.residual.luminance};- for(int i=0;i<12;++i){std::wostringstream o;o<<std::setprecision(7)<<v[i];if(i>=4&&i<=6){selectDiscrete(i-4,int(v[i]));continue;}if(GetFocus()!=item(100+i))putText(100+i,o.str().c_str());send(600+i,TBM_SETPOS,TRUE,LPARAM(v[i]*100));}+ for(int i=0;i<12;++i){std::wostringstream o;o<<std::setprecision(7)<<v[i];if(i>=4&&i<=6){selectDiscrete(i-4,int(v[i]));continue;}if(!editDrafts.contains(100+i)&&GetFocus()!=item(100+i))putText(100+i,o.str().c_str());send(600+i,TBM_SETPOS,TRUE,LPARAM(v[i]*100));}syncProtection(s.protection);check(200,enhancementEnabled&&s.nr?BST_CHECKED:BST_UNCHECKED);check(201,enhancementEnabled&&s.sr?BST_CHECKED:BST_UNCHECKED);@@ -935,7 +940,7 @@ void populate(engine::EnhancementSettings s){send(209,CB_SETCURSEL,int(s.opticalFlowBackend),0);check(215,s.amdFlowHalfResolution?BST_CHECKED:BST_UNCHECKED);send(216,CB_SETCURSEL,int(s.audioSync));- if(GetFocus()!=item(217))putText(217,std::to_wstring(s.audioOffsetMs).c_str());+ if(!editDrafts.contains(217)&&GetFocus()!=item(217))putText(217,std::to_wstring(s.audioOffsetMs).c_str());EnableWindow(item(217),s.audioSync==engine::AudioSyncMode::Manual);EnableWindow(item(204),s.opticalFlowBackend==engine::OpticalFlowBackend::Nvidia);EnableWindow(item(215),s.opticalFlowBackend==engine::OpticalFlowBackend::AmdFidelityFx);@@ -965,6 +970,8 @@ bool read(engine::EnhancementSettings& s,bool allPages=false){s=enhancementEnabl// Each notification changes one field on the latest desired settings. Hidden// controls and incomplete numeric text can never overwrite another field.bool liveField(int id){+ const bool numeric=(id>=100&&id<=111)||id==217||id==222;+ if(numeric){editDrafts.insert(id);syncRowResets();}if(id==202){const auto index=send(id,CB_GETCURSEL);if(index==CB_ERR)return false;const uint32_t requested=(index>=0&&index<int(engine::kFgMultiplierChoiceCount))?engine::kFgMultiplierChoices[index]:1;@@ -1005,6 +1012,7 @@ bool liveField(int id){}if(!s.validate().empty()){message(L"数值超出范围;仍使用上次有效值");return false;}if(!submit(s)){populate(enhancementEnabled?controller->snapshot().desired:configuredSettings);return false;}+ if(numeric)editDrafts.erase(id);populate(enhancementEnabled?controller->snapshot().desired:configuredSettings);message(enhancementEnabled?L"实时生效 · 以已应用版本为准":L"增强关闭中 · 已保存待启用设置");return true;}@@ -1138,7 +1146,7 @@ void syncRowResets(){const auto settings=enhancementEnabled?controller->snapshot().desired:configuredSettings;const engine::EnhancementSettings defaults{};for(const auto& [id,row]:rowResets){- const bool changed=std::abs(row.get(settings)-row.get(defaults))>0.00001;+ const bool changed=editDrafts.contains(row.value)||std::abs(row.get(settings)-row.get(defaults))>0.00001;if(bool(IsWindowEnabled(item(id)))!=changed)EnableWindow(item(id),changed);}}@@ -1455,8 +1463,10 @@ __declspec(noinline) LRESULT settingsCommand(HWND h,UINT msg,WPARAM wp,LPARAM lpif(const auto found=rowResets.find(LOWORD(wp));found!=rowResets.end()){auto settings=enhancementEnabled?controller->snapshot().desired:configuredSettings;found->second.reset(settings);- if(found->second.slider>=colorSliderId(0))applyColour(settings.color,false);- else submit(settings);+ const bool accepted=found->second.slider>=colorSliderId(0)?applyColour(settings.color,false):submit(settings);+ if(!accepted)return 0;+ editDrafts.erase(found->second.value);+ if(GetFocus()==item(found->second.value))SetFocus(body);populate(enhancementEnabled?controller->snapshot().desired:configuredSettings);return 0;}@@ -1646,10 +1656,12 @@ __declspec(noinline) LRESULT settingsCommand(HWND h,UINT msg,WPARAM wp,LPARAM lpif(msg==WM_COMMAND&&!populating&&!syncingColour&&LOWORD(wp)>=colorEditId(0)&&LOWORD(wp)<colorEditId(0)+kColorMaxParams&&HIWORD(wp)==EN_CHANGE){const int index=LOWORD(wp)-colorEditId(0);if(index<int(colorParams.size())){+ editDrafts.insert(LOWORD(wp));wchar_t buffer[64]{};GetWindowTextW(item(LOWORD(wp)),buffer,64);wchar_t* end=nullptr;const float value=wcstof(buffer,&end);if(end==buffer||*end||!std::isfinite(value))message(L"数值未完整;仍使用上次有效值");- else colourFieldEdited(index,value);+ else if(colourFieldEdited(index,value))editDrafts.erase(LOWORD(wp));+ syncRowResets();}return 0;}@@ -1658,7 +1670,7 @@ switch(msg){case WM_COMMAND:{const int id=LOWORD(wp);if(!populating&&((id>=202&&id<=205||id==207||id==208)&&HIWORD(wp)==CBN_SELCHANGE||(id>=700&&id<=732)&&HIWORD(wp)==BN_CLICKED)){liveField(id);return 0;}if((id==206||id==213||id==214)&&HIWORD(wp)==BN_CLICKED){const auto accepted=SendMessageW(GetParent(h),WM_APP+45,id,checked(206));message(accepted?(id==213?L"请在画面中左键拖动框选;Esc取消。":L"已请求更新NR剔除区。"):L"未能操作:请先打开画面,或清除已满的4个区域。");return 0;}if((id==200||id==201)&&HIWORD(wp)==BN_CLICKED){const bool accepted=SendMessageW(GetParent(h),WM_APP+44,id,checked(id))!=0;message(accepted?L"已请求开关;确认帧边界结果后生效。":L"总增强正在切换,请待当前事务完成。");return 0;}if(HIWORD(wp)==EN_SETFOCUS){for(auto& item:items)if(GetDlgCtrlID(item.h)==id&&item.page==page){RECT r{};GetClientRect(h,&r);int height=MulDiv(r.bottom,96,veyra::ui::layoutDpi(h))-128;if(item.y<scroll)scroll=item.y;if(item.y+item.height>scroll+height)scroll=item.y+item.height-height;arrange();break;}}if(!populating&&id>=100&&id<=111&&HIWORD(wp)==EN_CHANGE){liveField(id);return 0;}if(!populating&&id>=100&&id<=111&&HIWORD(wp)==EN_KILLFOCUS){populate(enhancementEnabled?controller->snapshot().desired:configuredSettings);return 0;}engine::EnhancementSettings s;- if(id==211){SetFocus(body);s={};if(submit(s))populate(s);message(L"已还原内建默认。");}+ if(id==211){SetFocus(body);s={};if(submit(s)){editDrafts.clear();populate(s);}message(L"已还原内建默认。");}else if(id>=501&&id<=505)SendMessageW(GetParent(h),WM_APP+41,id,id==501?send(500,CB_GETCURSEL,0,0):id==505?checked(505):0);return 0;}}return DefWindowProcW(h,msg,wp,lp);@@ -1710,14 +1722,14 @@ int id=GetDlgCtrlID(reinterpret_cast<HWND>(lp));if(id>=600&&id<612){int index=idconst float current=colorParams[size_t(index)].value(colourTarget());value=current+(value-current)*0.1f;}- colourFieldEdited(index,value);+ if(colourFieldEdited(index,value)){editDrafts.erase(colorEditId(index));syncColorControls();}}}else if(id==622){// Feather slider: the edit box owns the value, its EN_CHANGE applies it.const int value=std::clamp(int(SendMessageW(reinterpret_cast<HWND>(lp),TBM_GETPOS,0,0)),0,64);putText(222,std::to_wstring(value).c_str());}return 0;}case WM_TIMER:return settingsTimer(h,msg,wp,lp);-case WM_DESTROY:KillTimer(h,1);DeleteObject(font);window=nullptr;body=nullptr;items.clear();rowResets.clear();return 0;+case WM_DESTROY:KillTimer(h,1);DeleteObject(font);window=nullptr;body=nullptr;items.clear();rowResets.clear();editDrafts.clear();return 0;}return DefWindowProcW(h,msg,wp,lp);}}engine::EnhancementSettings defaultSettings(){loadStore();return store.defaultSettings();}diff --git a/apps/veyra/ui/AppShell.cpp b/apps/veyra/ui/AppShell.cppindex 2cccdd9b..acc8e8b8 100644--- a/apps/veyra/ui/AppShell.cpp+++ b/apps/veyra/ui/AppShell.cpp@@ -1135,7 +1135,20 @@ case WM_CLOSE:endTransition();if(!closing&&smokeSeconds<=0&&exportJob.poll().act}return DefWindowProcW(hwnd,msg,wp,lp);}+bool dpiRefreshPending=false;+__declspec(noinline) LRESULT refreshWindowDpi(HWND hwnd){+ if(!dpiRefreshPending)return 0;+ auto oldFont=font;font=veyra::ui::makeFont(hwnd);+ EnumChildWindows(hwnd,[](HWND c,LPARAM f)->BOOL{SendMessageW(c,WM_SETFONT,WPARAM(f),FALSE);return TRUE;},LPARAM(font));+ DeleteObject(oldFont);DeleteObject(emptyFont);emptyFont=veyra::ui::makeFont(hwnd,26);+ SendDlgItemMessageW(hwnd,EmptyTitle,WM_SETFONT,WPARAM(emptyFont),FALSE);+ veyra::ui::settingsDpi();veyra::ui::telemetryDpi();layout();+ dpiRefreshPending=false;+ RemovePropW(video,L"Veyra.DpiTransition");+ veyra::log::info("ui-display","DPI transition complete");return 0;+}LRESULT CALLBACK proc(HWND hwnd,UINT msg,WPARAM wp,LPARAM lp){switch(msg){+case WM_APP+91:return refreshWindowDpi(hwnd);case WM_SYSCOMMAND:return systemCommand(hwnd,msg,wp,lp);case WM_CREATE:return createWindow(hwnd,msg,wp,lp);case WM_NCCALCSIZE:if(wp)return 0;break;@@ -1166,7 +1179,7 @@ case WM_EXITSIZEMOVE:layout();veyra::log::info("ui-display","interactive move end; presentation resize released");return 0;-case WM_SIZE:cancelProtection();if(wp!=SIZE_MINIMIZED){endTransition();layout();}return 0;+case WM_SIZE:cancelProtection();if(wp!=SIZE_MINIMIZED&&!dpiRefreshPending){endTransition();layout();}return 0;case WM_DROPFILES:{std::vector<wchar_t> file(32768);DragQueryFileW(reinterpret_cast<HDROP>(wp),0,file.data(),32768);DragFinish(reinterpret_cast<HDROP>(wp));openFile(file.data());layout();return 0;}case WM_COMMAND:return windowCommand(hwnd,msg,wp,lp);case WM_HSCROLL:return scrollCommand(hwnd,msg,wp,lp);@@ -1185,14 +1198,12 @@ case WM_DPICHANGED:{endTransition();veyra::ui::cancelPopupSelector();veyra::log::info("ui-display",std::format("DPI transition begin dpi={} synthetic={} moving={}",veyra::ui::layoutDpi(hwnd),msg!=WM_DPICHANGED,GetPropW(video,L"Veyra.InteractiveMove")!=nullptr));SetPropW(video,L"Veyra.DpiTransition",HANDLE(1));+ // SetWindowPos synchronously reenters WM_SIZE and child layout. Coalesce+ // the font/layout refresh after the native DPI transition has returned.+ const bool queueRefresh=!dpiRefreshPending;dpiRefreshPending=true;if(msg==WM_DPICHANGED&&!full){auto rect=reinterpret_cast<RECT*>(lp);SetWindowPos(hwnd,nullptr,rect->left,rect->top,rect->right-rect->left,rect->bottom-rect->top,SWP_NOZORDER|SWP_NOACTIVATE);}- auto oldFont=font;font=veyra::ui::makeFont(hwnd);- EnumChildWindows(hwnd,[](HWND c,LPARAM f)->BOOL{SendMessageW(c,WM_SETFONT,WPARAM(f),FALSE);return TRUE;},LPARAM(font));- DeleteObject(oldFont);DeleteObject(emptyFont);emptyFont=veyra::ui::makeFont(hwnd,26);- SendDlgItemMessageW(hwnd,EmptyTitle,WM_SETFONT,WPARAM(emptyFont),FALSE);- veyra::ui::settingsDpi();veyra::ui::telemetryDpi();layout();- RemovePropW(video,L"Veyra.DpiTransition");- veyra::log::info("ui-display","DPI transition complete");return 0;}+ if(queueRefresh&&!PostMessageW(hwnd,WM_APP+91,0,0))return refreshWindowDpi(hwnd);+ return 0;}case WM_TIMER:return windowTimer(hwnd,msg,wp,lp);case WM_CLOSE:return closeWindow(hwnd,msg,wp,lp);diff --git a/docs/CURRENT_STATUS.md b/docs/CURRENT_STATUS.mdindex b5ecdc55..03dbcd4a 100644--- a/docs/CURRENT_STATUS.md+++ b/docs/CURRENT_STATUS.md@@ -1,5 +1,7 @@# 当前项目状态 / Current Status+2026-09-20 后续修复:设置数值草稿、羽化刷新递归通知和单项还原已修正;跨屏 DPI 字体/布局刷新合并到异步 UI 消息,避免 SetWindowPos 内重复布局。DLSS 6X / XeSS 4X 合成 DPI 切换与设置回归通过。本机仅一个物理显示器,不能宣称真实双屏卡死已验证消除。新本地包目录 `E:/项目/Veyra/test-packages/1.4.3-20260920-display-fix/`,验收见窗口修复文档。本轮不改变补帧调度。+2026-09-20 窗口边角拖动崩溃已定位为 UI 回调栈耗尽,拆分 AppShell / SettingsWindow 的重型消息处理后,本机真实鼠标拖动、采集、DLSS 6X / XeSS 4X 缩放和合成 DPI 回归通过。新版测试包输出到 `E:/项目/Veyra/test-packages/1.4.3-20260920-resize-fix/`;下方 final 目录为旧包。本轮不修改补帧调度,固定 6X 均匀呈现仍未解决。见 [窗口缩放修复](WINDOW_RESIZE_REPAIR_2026-09-20.md)。2026-09-20 用户决定暂止优化,交付重新构建的 1.4.3 本地测试包。基于 `d60ec88`,产品代码保持 `7a3dfae`,失败实验均回退;固定 6X 均匀呈现问题仍未解决。最新包位于 `E:/项目/Veyra/test-packages/1.4.3-20260920-final/`,构建、CPU/UI 回归及便携包七项运行检查通过。未推送或发布 GitHub;此前“目标继续”和“未打包”是历史状态。diff --git a/docs/RELEASE_NOTES_1.4.3.md b/docs/RELEASE_NOTES_1.4.3.mdindex 335870f4..b7915e6d 100644--- a/docs/RELEASE_NOTES_1.4.3.md+++ b/docs/RELEASE_NOTES_1.4.3.md@@ -4,6 +4,9 @@包含 1.4.2 发布后当前分支的修复:+- 合并跨屏 DPI 变化的字体与布局刷新,减少同步窗口消息嵌套;DLSS 6X / XeSS 4X 的合成 DPI 切换后持续出帧。本机仅一块显示器,真实双屏拖动仍待验收。+- 修复 NR、羽化和调色数值输入被定时刷新覆盖,以及存在未提交输入时单项还原不可用的问题;还原失败保留输入,成功只清除对应项。+- 保留此前 `7a3dfae` 的补帧基线,并修复拖动窗口边角时的 UI 线程栈耗尽崩溃。保留用户选择的补帧倍率,不再自动改成较低倍率。- 拆分主窗口与设置面板的高栈占用消息处理;真实鼠标拖动、采集预览及 NR + DLSS 6X / XeSS 4X 反复缩放已通过本机短测。- 保留文件播放有限追赶、逐子帧状态读取及对应 GPU fence 保护;无收益或存在资源安全问题的后续实验已回退。没有加入额外 35/50ms 等待。diff --git a/docs/WINDOW_RESIZE_REPAIR_2026-09-20.md b/docs/WINDOW_RESIZE_REPAIR_2026-09-20.mdindex 9785b4cb..56357bda 100644--- a/docs/WINDOW_RESIZE_REPAIR_2026-09-20.md+++ b/docs/WINDOW_RESIZE_REPAIR_2026-09-20.md@@ -91,3 +91,116 @@ ZIP: E:/项目/Veyra/test-packages/1.4.3-20260920-resize-fix/Veyra-1.4.3-test-wiSize: 472349977 bytes.SHA256: ABA2DA87D1A308629BE1CD347401DF266212D98BC9A5E904E078512AE6FADD19.++## Follow-up regression review++Reviewed at 2b99e89 after the user requested attribution to earlier fixes.+No additional product changes or package replacement in this review.++### Attribution limits++The immediate cause is established by the crash dumps, actual mouse repro,+and compiled stack allocations above. The failing reproduction had all+effects disabled. It therefore does not require active DLSS/XeSS work.+Large settings/snapshot locals and many handlers shared one reentrant window+procedure. Nested synchronous layout/paint messages reserved that large+frame repeatedly. Total GPU load is not an explanation for this stack fault.++History review covered 412a19f (row reset controls), 7761f34 (cross-monitor+handling), 8c9957b (backend switching) and 0050870 (FG overload status).+7761f34 added interactive-move/DPI flags and an exit layout call; the large+callback structure predates it. These changes can affect the message path,+but this is not proof that 7761f34 introduced the first crashing version.+No historical binary bisection or historical callback recompilation was+completed. Do not name a particular FG optimization as the proven origin.++### Additional findings++- SettingsWindow.cpp:860-873,1669: syncProtection writes edit 222 even while+ it is focused, and the timer invokes it outside populate's notification+ guard. Clearing the feather field to enter a replacement can be overwritten+ by the next refresh. Programmatic text changes can also reenter liveField.+ The offending feather synchronization dates to c6f94433 (2026-09-17),+ before the resize extraction. Code-path finding; no dedicated interactive+ reproduction was performed in this follow-up.+- SettingsWindow.cpp:1136-1143: row reset enabled state compares desired+ settings only, ignoring unsubmitted edit text. At backend defaults an+ invalid edit leaves the reset button disabled, so it cannot clear that+ draft. Introduced with row resets in 412a19f. Code-path finding, not a new+ resize-repair regression; dedicated interactive coverage remains needed.+- The existing NR_off_click_works_with_invalid_draft integration assertion+ fails in both old and repaired packages. It combines NR state, checkbox+ state and draft preservation in one assertion. Successful NR-disable graph+ logs do not prove all three predicates. The test also edits an unfocused+ control; isolate those predicates before claiming normal typing is broken.+ This failure remains open and must not be counted as a passed repair gate.++### Broader callback stack inspection++Read the current veyra.map and PE unwind records using the existing+ui-stack-budget.py parser via Python runpy, including other proc/subclass+symbols. Largest observed callback was ScreenCapturePanel proc at 27240+bytes; AppShell interaction 9960, labelPaint 8472, live_status proc 7656,+screen previewProc 6968. Main/inspector remain 280/2536 bytes. No inspected+callback exceeded 32768 bytes. This is a per-function check, not proof of+bounded aggregate call depth or absence of recursion. Historical maps were+not available for equivalent old-version comparisons.++Scope is UI regression review around resize, settings synchronization and+recent window changes, not certification of the entire application. Real+multi-monitor transitions and the separate fixed-6X cadence issue remain+outside this pass. No runtime files were changed or added to Git.++## Follow-up implementation: settings drafts and display transitions++The preceding review findings are historical; this follow-up implements them.+SettingsWindow now tracks numeric drafts per control. Timer updates preserve+unfinished/rejected text; row resets remain enabled for drafts, retain them+when submission fails, and clear only their own field after acceptance.+Feather synchronization guards programmatic notifications. Integration tests+cover NR, feather and colour drafts, timer refreshes and rejected resets.++AppShell queues a coalesced DPI font/layout refresh after SetWindowPos returns.+WM_SIZE skips redundant layout while that refresh is pending; the existing+presentation transition flag remains active until refresh completion. This+hardens nested UI work but is not proof of the user's physical cross-screen+failure cause. Only one monitor (2560x1440) is connected here.++Validation using build/slider-reset-20260919 under E:/项目/Veyra:++- scripts/build-isolated.ps1, targets veyra, veyra_slider_reset_tests,+ veyra_ui_contract_tests, DisplayVersion 1.4.3: passed.+- veyra_slider_reset_tests: passed new draft/reset checks.+- veyra_ui_contract_tests: passed 384 layout cases, persistence and PCM checks.+- ui-stack-budget.py: callbacks remain 280/2536 bytes.+- --smoke-repair-ui with visible-scene.mp4, --nr --no-sr --no-fg,+ --smoke-seconds 25: passed, 288 frames, failed=false. The historical+ NR_off_click_works_with_invalid_draft failure is now resolved in this run.+- ui-display-transition.py with p001.mp4, --nr --sr and DLSS6 / XeSS4:+ passed native-message plus synthetic 144/192/96 DPI cycles and continued+ presentation. physicalCrossMonitorTested=false in both result files.++Evidence: E:/项目/Veyra/tests/resize-hang-20260920/followup-*. Initial DPI+reader incorrectly demanded a one-second present-cost sample between two+adjacent completion logs; corrected to inspect each move cycle after its+final DPI completion, rerun passed. Initial evidence retained. These are+software checks, not optical latency or physical dual-monitor acceptance.++Final follow-up package verification:++- ui-native-resize.py with NR/SR/XeSS4: four native modal sizing cycles+ 1280x800 <-> 1544x1064 passed, normal exit (followup-native-xess).+- package-portable.ps1 -Version 1.4.3 -Label '-test' with the build above+ and OutputDirectory E:/项目/Veyra/test-packages/1.4.3-20260920-display-fix:+ passed runtime audit, forbiddenFiles=0.+- portable-smoke.ps1 -CaseSeconds 7, InputFile+ E:/项目/Veyra/tests/1.4.2beta/visible-scene.mp4: seven cases passed;+ result in followup-portable-smoke/result.json beneath the evidence root.+- All 120 ZIP payload sizes/SHA256 match package-manifest.json. Packaged EXE+ equals tested build: F2A1E407D2FE136C32771BCF25068A6F595D51CC6B4F15766964B6A358B80676.++New ZIP: E:/项目/Veyra/test-packages/1.4.3-20260920-display-fix/Veyra-1.4.3-test-win64-portable.zip+Size: 472352589 bytes.+SHA256: C3A40A6A1A6C076243E5DAE38380AC81C13372C7A261EBC40E1DDD9989EAE3BE.+Prior resize-fix package retained as a comparison/rollback artifact.+No push or public release performed.diff --git a/docs/WORKLOG.md b/docs/WORKLOG.mdindex 6f838c1a..4c9bf937 100644--- a/docs/WORKLOG.md+++ b/docs/WORKLOG.md@@ -1,5 +1,26 @@# Veyra 工作记录+## 2026-09-20 Settings and display transition follow-up++Implemented numeric draft preservation and transactional per-row reset in+SettingsWindow, plus coalesced DPI font/layout refresh in AppShell. No FG+scheduler, multiplier, runtime or latency changes. New UI integration checks+and scripts/acceptance/ui-display-transition.py exercise actual HWNDs.+Build, slider-reset, UI contract, stack budget, repair-ui and DLSS6/XeSS4 DPI+checks pass. Physical dual-screen remains untested (one monitor detected).+Commands, initial test-reader failure and coverage are recorded in+docs/WINDOW_RESIZE_REPAIR_2026-09-20.md. Build remains under+E:/项目/Veyra/build/slider-reset-20260919; evidence under+E:/项目/Veyra/tests/resize-hang-20260920; process temp under+E:/项目/Veyra/tmp/fg-cadence-repair-20260920. New package target:+E:/项目/Veyra/test-packages/1.4.3-20260920-display-fix. Local delivery only.++Completed: XeSS4 native modal sizing four cycles passed. New portable ZIP+472352589 bytes, SHA256 C3A40A6A1A6C076243E5DAE38380AC81C13372C7A261EBC40E1DDD9989EAE3BE.+Seven portable smoke cases passed; all 120 archived payload hashes/sizes match,+forbiddenFiles=0 and packaged EXE equals the tested build. Previous package+retained for rollback; no new SDK/runtime or test media enters Git.+## 2026-09-20 Window corner resize crashReproduced real mouse resize crash with capture and effects disabled. Dump and@@ -5168,3 +5189,19 @@ GPU full-group 观测约 NR 6.715ms、Flow 1.056ms、FG batch 10.042ms,slot CP4.519/16.692/17.102ms,18 个间隔超过 16.667ms,36 次 rejected→warmup;GPUP95 约 NR5.664ms、Flow1.265ms、FG10.659ms,slot CPU wait 仍为 0。降低 NR 分辨率接近但没有达到均匀固定 6X,因此仍只作为性能对照,不改变原画质验收目标。+# Resize regression attribution follow-up (2026-09-20)++Reviewed 2b99e89 and prior UI commits using git show/blame and source reads.+Extended the current PE/map stack inspection through Python runpy and the+existing scripts/acceptance/ui-stack-budget.py parser. Main/inspector stacks+remain 280/2536 bytes; largest other inspected callback is screen capture at+27240 bytes. No historical binary bisection completed, so the first offending+commit is not established. Added findings and evidence limits to+docs/WINDOW_RESIZE_REPAIR_2026-09-20.md: feather draft refresh from c6f94433,+row-reset draft omission from 412a19f, and the existing combined NR/draft+assertion failure on both package versions. These findings are not reported+as repaired. This follow-up changes documentation only, requires no rebuild,+and leaves the previously verified resize-fix package untouched. Existing+evidence/build paths are E:/项目/Veyra/tests/resize-hang-20260920 and+E:/项目/Veyra/build/slider-reset-20260919; no new binary artifacts, runtime+changes, publication or shutdown.diff --git a/scripts/acceptance/ui-display-transition.py b/scripts/acceptance/ui-display-transition.pynew file mode 100644index 00000000..61082aea--- /dev/null+++ b/scripts/acceptance/ui-display-transition.py@@ -0,0 +1,101 @@+"""Own-process display/DPI regression; reports physical monitor coverage separately."""+import ctypes as c+import ctypes.wintypes as w+import json+import os+from pathlib import Path+import subprocess+import sys+import time++exe, output = Path(sys.argv[1]).resolve(), Path(sys.argv[2]).resolve()+output.mkdir(parents=True, exist_ok=True)+u = c.WinDLL('user32', use_last_error=True)+u.SetProcessDpiAwarenessContext.argtypes = [w.HANDLE]+u.SetProcessDpiAwarenessContext(c.c_void_p(-4))+u.GetWindowThreadProcessId.argtypes = [w.HWND, c.POINTER(w.DWORD)]+u.GetClassNameW.argtypes = [w.HWND, w.LPWSTR, c.c_int]+u.GetWindowRect.argtypes = [w.HWND, c.POINTER(w.RECT)]+u.SetWindowPos.argtypes = [w.HWND, w.HWND, c.c_int, c.c_int, c.c_int, c.c_int, w.UINT]+u.SendMessageTimeoutW.argtypes = [w.HWND, w.UINT, w.WPARAM, w.LPARAM, w.UINT, w.UINT, c.POINTER(c.c_size_t)]+u.GetPropW.argtypes = [w.HWND, w.LPCWSTR]+u.GetPropW.restype = w.HANDLE+visit_type = c.WINFUNCTYPE(w.BOOL, w.HWND, w.LPARAM)+monitor_type = c.WINFUNCTYPE(w.BOOL, w.HANDLE, w.HDC, c.POINTER(w.RECT), w.LPARAM)+monitors = []++@monitor_type+def monitor_visit(handle, dc, rect, data):+ r = rect.contents+ monitors.append([r.left, r.top, r.right, r.bottom])+ return True++u.EnumDisplayMonitors(None, None, monitor_visit, 0)+result = {'passed': False, 'monitors': monitors, 'physicalCrossMonitorTested': len(monitors) > 1}+env = os.environ.copy()+env['VEYRA_LOG_FILE'] = str(output / 'app.log')+with (output / 'stdout.log').open('w') as stdout, (output / 'stderr.log').open('w') as stderr:+ process = subprocess.Popen([str(exe), '--smoke-view', 'pro', '--smoke-seconds', '60', *sys.argv[3:]], env=env, stdout=stdout, stderr=stderr)+ try:+ found = []++ @visit_type+ def visit(hwnd, data):+ pid = w.DWORD()+ u.GetWindowThreadProcessId(hwnd, c.byref(pid))+ name = c.create_unicode_buffer(128)+ u.GetClassNameW(hwnd, name, 128)+ if pid.value == process.pid and name.value == 'VeyraApp':+ found.append(hwnd)+ return True++ deadline = time.monotonic() + 10+ while not found and time.monotonic() < deadline:+ u.EnumWindows(visit, 0)+ time.sleep(.1)+ assert found, 'main window missing'+ main = found[0]++ def send(message=0, wp=0, lp=0):+ reply = c.c_size_t()+ assert process.poll() is None, f'app exited {process.returncode}'+ assert u.SendMessageTimeoutW(main, message, wp, lp, 2, 3000, c.byref(reply)), 'UI timeout'++ time.sleep(5)+ for cycle, dpi in enumerate([144, 192, 96, 0]):+ send(0x231) # WM_ENTERSIZEMOVE+ if len(monitors) > 1:+ r = monitors[cycle % len(monitors)]+ assert u.SetWindowPos(main, None, r[0]+20, r[1]+20, 0, 0, 0x15)+ # Test both the real WM_DPICHANGED suggested-rectangle path and+ # the explicit layout-DPI harness (not physical HDR/adapter coverage).+ rect = w.RECT()+ u.GetWindowRect(main, c.byref(rect))+ actual = dpi or 96+ send(0x2E0, actual | (actual << 16), c.addressof(rect))+ send(0x8000+90, dpi)+ time.sleep(1)+ send(0x232) # WM_EXITSIZEMOVE+ time.sleep(1)+ send()+ send(0x10)+ assert process.wait(timeout=12) == 0+ log = (output / 'app.log').read_text(encoding='utf-8', errors='replace')+ segments = log.split('interactive move begin;')[1:]+ assert len(segments) == 4, 'missing move cycles'+ for segment in segments:+ assert 'DPI transition complete' in segment, 'missing deferred DPI completion'+ settled = segment.rsplit('DPI transition complete', 1)[1]+ assert '[present-cost]' in settled, 'presentation stopped after DPI cycle'+ assert 'ResizeBuffers FAILED' not in log and 'DEVICE_REMOVED' not in log+ result['passed'] = True+ except Exception as error:+ result['error'] = str(error)+ raise+ finally:+ if process.poll() is None:+ process.kill()+ process.wait(timeout=5)+ result['exitCode'] = process.returncode+ (output / 'result.json').write_text(json.dumps(result, indent=2), encoding='utf-8')+print(json.dumps(result))diff --git a/tests/integration/SliderResetTests.cpp b/tests/integration/SliderResetTests.cppindex 611617f8..aa60f8cc 100644--- a/tests/integration/SliderResetTests.cpp+++ b/tests/integration/SliderResetTests.cpp@@ -51,6 +51,23 @@ int wmain(int argc,wchar_t**){try{ui::settingsColorSectionForTest(0,false);require(!(GetWindowLongW(ui::settingsControlForTest(3400),GWL_STYLE)&WS_VISIBLE),"collapsed row must hide reset");ui::settingsColorSectionForTest(0,true);+ auto text=[&](int id){wchar_t value[128]{};GetWindowTextW(ui::settingsControlForTest(id),value,128);return std::wstring(value);};+ actual=defaults;++actual.revision;sync();+ SetWindowTextW(ui::settingsControlForTest(100),L"NaN");+ SetWindowTextW(ui::settingsControlForTest(222),L"");+ SetWindowTextW(ui::settingsControlForTest(1300),L"-");+ for(int i=0;i<4;++i)sync();+ require(text(100)==L"NaN"&&text(222).empty()&&text(1300)==L"-","timer must preserve incomplete drafts across fields");+ require(IsWindowEnabled(ui::settingsControlForTest(2600))&&IsWindowEnabled(ui::settingsControlForTest(2622))&&IsWindowEnabled(ui::settingsControlForTest(3400)),"drafts at defaults must enable row reset");+ reject=true;SendMessageW(ui::settingsControlForTest(2600),BM_CLICK,0,0);reject=false;+ require(text(100)==L"NaN","rejected reset must retain draft");+ SendMessageW(ui::settingsControlForTest(2600),BM_CLICK,0,0);+ require(text(100)!=L"NaN"&&text(222).empty()&&text(1300)==L"-","row reset must clear only its own draft");+ SendMessageW(ui::settingsControlForTest(2622),BM_CLICK,0,0);+ SendMessageW(ui::settingsControlForTest(3400),BM_CLICK,0,0);+ require(!text(222).empty()&&text(1300)!=L"-","feather and colour reset must restore displayed defaults");+ SetWindowTextW(ui::settingsControlForTest(222),L"12");sync();+ require(actual.protection.featherPixels==12&&text(222)==L"12","valid feather edit must still apply");SetWindowPos(panel,nullptr,0,0,360,800,SWP_NOZORDER);std::cout<<"PASS: individual defaults, unrelated settings, undo, rejection, enabled state, narrow layout and folding\n";if(argc>1){const auto end=GetTickCount64()+60000;MSG msg{};while(GetTickCount64()<end&&IsWindow(parent)){while(PeekMessageW(&msg,nullptr,0,0,PM_REMOVE)){TranslateMessage(&msg);DispatchMessageW(&msg);}Sleep(10);}}