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

fix(ui): preserve fullscreen click origin and native video cursor policy

Veyra Goal Agent33ec229dafd7
diff --git a/AGENTS.md b/AGENTS.md
index b5ff15a4..7944511f 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -1,5 +1,7 @@
# Veyra 项目 Agent 执行规则
+> **2026-10-18 全屏输入修复授权**:用户明确专业模式全屏误暂停/恢复、极简全屏指针不隐藏一起修。按 docs/FULLSCREEN_INPUT_PLAN_2026-10-18.md 在 codex/fullscreen-input-20261018(基于 AMD0.44 f6c4fd9)隔离修改 QML 画面点击与 apps/veyra-qml 原生窗口指针接点,覆盖本范围历史冻结;不改引擎/媒体/效果/刷新频率,不干扰 Claude。全 E盘、私有配置、限并发构建与真实原生 UI 回归;不合 main/push/发布/关机,不派 Agent。
+
> **2026-10-18 AMD NR0.44隔离接入授权**:用户提供Magpie-DLSS5-AMD-0.44.zip并要求开分支接入,明确Claude同时工作、不得互相影响。从main26c0d61在codex/amd-nr-044-20261018实施,计划docs/AMD_NR_044_PLAN_2026-10-18.md。允许AMD独立C ABI runtime0.44固定4764e4f1、原样权重/HIP资源、必要Small/Original模型参数/设置/UI/共享图及构建部署/定向回归接点,覆盖这些历史冻结;NVIDIA现行路径、33ms/250ms、采集/补帧/颜色合同保持。源包447952711bytes/SHA CF812FE7909FBD53B38F54DA8ABD584698525F81F7EA71CAB19BA14BAB48E030与作者热修相符,875条内部SHA已验证。88原树/101分支/509脏文件及source-before.bundle已独立存档;Claude可正常推进其分支,不重置/覆盖/锁住其工作,不发送跨任务消息、不派Agent。所有产物E盘独立amd-nr-044-20261018,CPU构建限并发,GPU回归前核对空闲,不停止他人进程。测试≤300秒、构建≤900秒。无本轮main合并/push/Release/正式包/关机授权;原SDK/专有DLL/权重/驱动及真实配置不改,不进源码Git。无RX9000实卡须明确未验,不把fake ABI或5070测量冒充AMD推理。
diff --git a/apps/veyra-qml/main.cpp b/apps/veyra-qml/main.cpp
index 16f1ef10..27eb74d1 100644
--- a/apps/veyra-qml/main.cpp
+++ b/apps/veyra-qml/main.cpp
@@ -61,6 +61,41 @@ using namespace veyra;
namespace {
HWND g_video = nullptr;
+bool g_videoCursorHidden = false;
+
+// The video is a foreign HWND, not a Qt item. Match the QML cursor policy here
+// without a repaint, a polling timer or ShowCursor's process-wide counter.
+bool pointerOverVideo() {
+ if (!g_video || !IsWindowVisible(g_video)) return false;
+ const HWND parent = GetParent(g_video);
+ if (!parent || GetForegroundWindow() != parent) return false;
+ POINT p{};
+ if (!GetCursorPos(&p)) return false;
+ const HWND hit = WindowFromPoint(p);
+ if (hit != g_video && hit != parent) return false;
+ ScreenToClient(g_video, &p);
+ RECT client{};
+ GetClientRect(g_video, &client);
+ if (!PtInRect(&client, p)) return false;
+ // Floating QML controls are holes in this region; never override their
+ // pointing/text cursors, nor any other application's cursor.
+ HRGN region = CreateRectRgn(0, 0, 0, 0);
+ const int kind = GetWindowRgn(g_video, region);
+ const bool inside = kind == ERROR || PtInRegion(region, p.x, p.y);
+ DeleteObject(region);
+ return inside;
+}
+
+void syncVideoCursor(bool hidden) {
+ if (g_videoCursorHidden == hidden) return;
+ g_videoCursorHidden = hidden;
+ const bool overVideo = pointerOverVideo();
+ if (overVideo) SetCursor(hidden ? nullptr : LoadCursorW(nullptr, IDC_ARROW));
+ CURSORINFO cursor{sizeof(cursor)};
+ const bool known = GetCursorInfo(&cursor) != 0;
+ veyra::log::info("ui-cursor", std::format("hidden={} overVideo={} applied={} cursorKnown={} cursorShowing={}",
+ hidden, overVideo, overVideo, known, known && (cursor.flags & CURSOR_SHOWING) != 0));
+}
enum class VideoProbeMode { Normal, Hidden, NoRegion, CoversOnly };
VideoProbeMode g_videoProbe = VideoProbeMode::Normal;
bool g_videoHiddenByProbe = false;
@@ -121,6 +156,10 @@ LRESULT CALLBACK videoProc(HWND h, UINT m, WPARAM w, LPARAM l) {
// The pointer belongs to the QML layer under the picture (the dock's hot zone
// at the top edge, the cinema controls): pass hit testing through to it.
if (m == WM_NCHITTEST) return HTTRANSPARENT;
+ if (m == WM_SETCURSOR && LOWORD(l) == HTCLIENT && g_videoCursorHidden && pointerOverVideo()) {
+ SetCursor(nullptr);
+ return TRUE;
+ }
return DefWindowProcW(h, m, w, l);
}
@@ -594,6 +633,16 @@ static int runApplication(int argc, char** argv, QString& restartProgram, QStrin
bool nativeEventFilter(const QByteArray& type, void* message, qintptr* result) override {
if (type != "windows_generic_MSG") return false;
const auto* msg = static_cast<const MSG*>(message);
+ // HTTRANSPARENT forwards the native child's hit test to Qt's
+ // parent. Refuse the class arrow there too while the picture hides
+ // the cursor; hover over a control or another window is untouched.
+ if (msg->message == WM_SETCURSOR && LOWORD(msg->lParam) == HTCLIENT
+ && g_videoCursorHidden && (msg->hwnd == g_video || msg->hwnd == GetParent(g_video))
+ && pointerOverVideo()) {
+ SetCursor(nullptr);
+ if (result) *result = TRUE;
+ return true;
+ }
if (msg->message != WM_SYSCOMMAND || (msg->wParam & 0xFFF0) != SC_KEYMENU) return false;
veyra::log::info("ui-window", std::format("system key menu refused (lParam=0x{:X})", unsigned(msg->lParam)));
if (result) *result = 0;
@@ -872,6 +921,7 @@ static int runApplication(int argc, char** argv, QString& restartProgram, QStrin
// swapchain from a 1x1 window. The native calls only run when a value changed.
auto follow = [window, &bridge] {
if (!g_video) return;
+ syncVideoCursor(window->property("fullscreenCursorHidden").toBool());
// Only the pre-open hook attaches the popup and converts it to WS_CHILD.
// GetParent() is null for an unattached WS_POPUP, so reparenting here on
// every animation frame can starve input and timers before any source opens.
diff --git a/docs/FULLSCREEN_INPUT_PLAN_2026-10-18.md b/docs/FULLSCREEN_INPUT_PLAN_2026-10-18.md
new file mode 100644
index 00000000..71857b45
--- /dev/null
+++ b/docs/FULLSCREEN_INPUT_PLAN_2026-10-18.md
@@ -0,0 +1,19 @@
+# 全屏点击与鼠标隐藏修复
+
+用户要求同时修复专业模式点击全屏误暂停/恢复、极简全屏指针不隐藏。隔离分支 codex/fullscreen-input-20261018,基于已完成 AMD0.44 分支 f6c4fd9;不改 main 或 Claude 正在施工的分支,不发布。
+
+## 已复现
+
+- 独立私有配置 GTA4K 播放,专业模式点击全屏按钮,同一时刻出现 ui-fullscreen enabled=true 与 ui-transport pause。按下在播放条,松开时全屏使画面几何扩大,窗口级 TapHandler 误将其视为画面点击。
+- fullControls=false、Qt.BlankCursor=10 后实际屏幕仍可见箭头。Qt 画面层与原生视频 HWND 的指针策略没有同步。
+- 基线证据 E:/项目/Veyra/logs/fullscreen-input-20261018/baseline;仅基线 staging 添加观察探针,生产 QML 不添加观察 Timer。
+
+## 最小修改
+
+1. 画面 TapHandler 按下时记录是否在画面内,按钮改变布局不再改变该次点击的归属。保留画面单击暂停、双击全屏及串流捕获的既有行为。
+2. 统一 QML/原生视频的隐藏条件,用现有 afterAnimating/snapshotChanged 跟随及 WM_SETCURSOR 同步。只影响当前前台视频区域,尊重浮层裁剪,退出全屏/显示控件恢复;不使用全局 ShowCursor 计数。
+3. UI33ms/250ms、1.6秒自动隐藏不变,不新增播放 Timer/requestUpdate/全量重绘,不改媒体/效果/调度。
+
+## 验证
+
+限并发独立构建、Qt Quick/布局/预览几何回归;Windows 原生真实鼠标检查专业模式播放与暂停两种状态进出全屏、极简全屏空闲隐藏/活动恢复、菜单/锁定及退出。记录操作后的真实 OS cursorShowing 与传输日志,不能只用 QML 请求值充当通过。正常/软件 UI 在可行范围分别验证。所有产物 E:/项目/Veyra 对应 fullscreen-input-20261018 目录;单测试≤300秒、构建≤900秒。未覆盖硬件/输入须明示。
diff --git a/docs/WORKLOG.md b/docs/WORKLOG.md
index 3c4b56de..6d98570c 100644
--- a/docs/WORKLOG.md
+++ b/docs/WORKLOG.md
@@ -1,5 +1,9 @@
# WORKLOG
+## 2026-10-18 全屏点击与指针修复开工
+
+基于AMD0.44 f6c4fd9开codex/fullscreen-input-20261018,不改main/Claude树。基线独立GTA4K真实点击已复现按钮全屏后立刻pause,Qt BlankCursor请求后实际指针仍可见;日志logs/fullscreen-input-20261018/baseline。按下时记录画面归属,原生HWND同步Qt隐藏策略且尊重浮层区域;不加Timer/重绘、不改33ms/250ms。计划FULLSCREEN_INPUT_PLAN_2026-10-18.md。首次文档patch因WORKLOG标题匹配错误失败,原子回退该文档patch,正确标题重施;无产品数据影响。接下来独立构建/定向回归/实际鼠标验收,无发布授权。
+
## 2026-10-17 采集格式与旧版入口(Linux 源码候选)
按用户“全部修复掉,再添加老版本采集格式选择入口”,在窗口修复 1295d6b 之上隔离实施 `codex/capture-format-fixes-20261017`。修复 DirectShow 能力回退、尺寸/帧率范围候选、±1 tick 显示分组漏掉像素项、精确媒体类型恢复与连接校验;增加可搜索虚拟化旧版组合列表、自定义尺寸检查和查询错误诊断。原低延迟回调/队列、BMD 原生、增强/音频/渲染/运行库与配置保持。详见 docs/CAPTURE_FORMAT_FIXES_2026-10-17.md。
diff --git a/qml/Veyra/Main.qml b/qml/Veyra/Main.qml
index 993734f5..0ffdd149 100644
--- a/qml/Veyra/Main.qml
+++ b/qml/Veyra/Main.qml
@@ -495,6 +495,10 @@ Window {
// top-level window (FullscreenBar.qml), because the native video window draws
// above everything in this one.
property bool fullControls: true
+ // Also consumed by the native video HWND: a QML cursor alone cannot hide
+ // the class cursor of the foreign child window under a stationary pointer.
+ readonly property bool fullscreenCursorHidden: fullscreen && (!fullControls || fullLocked)
+ && !quickPanelShown && dialogs.dialog === ""
function pointerActivity() {
if (!fullscreen || fullLocked || root.test.fullBar === "hidden") return
if (root.test.fullDebug === true) veyra.logUi("ui-fullscreen-debug", "pointer activity")
@@ -516,7 +520,7 @@ Window {
// hides with the controls, as in AppShell.
HoverHandler {
id: pointerWatch
- cursorShape: root.fullscreen && (!root.fullControls || root.fullLocked) && !root.quickPanelShown ? Qt.BlankCursor : Qt.ArrowCursor
+ cursorShape: root.fullscreenCursorHidden ? Qt.BlankCursor : Qt.ArrowCursor
// Qt re-sends hover while anything animates under a still pointer; only a
// real change of position counts as movement.
property point last: Qt.point(-1, -1)
@@ -569,10 +573,17 @@ Window {
enabled: !root.fullLocked && !veyra.gameInputActive
// Judged where the press landed: by the release the page may already have changed.
property bool pressOnCover: false
- onPressedChanged: if (pressed) pressOnCover = root.overVideoCover(point.scenePosition)
+ property bool pressOnPicture: false
+ onPressedChanged: if (pressed) {
+ pressOnCover = root.overVideoCover(point.scenePosition)
+ pressOnPicture = root.pictureContains(point.scenePosition)
+ }
onTapped: (eventPoint, button) => {
const p = eventPoint.position
- if (pressOnCover) return
+ // A transport button can enter fullscreen before this handler sees
+ // release. Its press still belongs to the transport, not the newly
+ // enlarged picture underneath it.
+ if (pressOnCover || !pressOnPicture) return
if (root.page !== "min" && root.page !== "pro" && root.page !== "node" && !root.fullscreen) return
if (dialogs.dialog !== "" || !veyra.hasSource) return
if (root.fullscreen && root.quickPanelShown && (proPage.overlayContains(p.x, p.y) || nodePage.overlayContains(p.x, p.y))) return
@@ -588,10 +599,14 @@ Window {
TapHandler {
enabled: !root.fullLocked && !veyra.gameInputActive
property bool pressOnCover: false
- onPressedChanged: if (pressed) pressOnCover = root.overVideoCover(point.scenePosition)
+ property bool pressOnPicture: false
+ onPressedChanged: if (pressed) {
+ pressOnCover = root.overVideoCover(point.scenePosition)
+ pressOnPicture = root.pictureContains(point.scenePosition)
+ }
onDoubleTapped: (eventPoint, button) => {
const p = eventPoint.position
- if (pressOnCover) return
+ if (pressOnCover || !pressOnPicture) return
if (root.fullscreen) {
if (root.quickPanelShown && (proPage.overlayContains(p.x, p.y) || nodePage.overlayContains(p.x, p.y))) return
root.toggleFullscreen()
@@ -610,10 +625,14 @@ Window {
TapHandler {
enabled: veyra.moonlight && veyra.moonlight.state.streaming === true && !veyra.moonlightCaptured && dialogs.dialog === ""
property bool pressOnCover: false
- onPressedChanged: if (pressed) pressOnCover = root.overVideoCover(point.scenePosition)
+ property bool pressOnPicture: false
+ onPressedChanged: if (pressed) {
+ pressOnCover = root.overVideoCover(point.scenePosition)
+ pressOnPicture = root.pictureContains(point.scenePosition)
+ }
onTapped: eventPoint => {
const p = eventPoint.position
- if (pressOnCover) return
+ if (pressOnCover || !pressOnPicture) return
if (root.page !== "min" && root.page !== "pro" && root.page !== "node") return
if (p.x < videoHost.x || p.y < videoHost.y || p.x > videoHost.x + videoHost.width
|| p.y > videoHost.y + videoHost.height) return