From f19d883a69b5942c667d4e2ca3f0f689b5adb827 Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 12 Mar 2026 08:55:46 +0100 Subject: [PATCH] fix: native resolution capture + correct click offset for title bar - Remove restrictive resolution constraints, capture at native res - Account for window frame/title bar when mapping click coordinates (capture includes title bar but sendInputEvent is content-relative) Co-Authored-By: Claude Opus 4.6 --- lib/remote-capture.html | 6 +----- main.js | 10 +++++++--- package.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/remote-capture.html b/lib/remote-capture.html index 399ae3e..64d3699 100644 --- a/lib/remote-capture.html +++ b/lib/remote-capture.html @@ -22,11 +22,7 @@ async function getCaptureStream() { mandatory: { chromeMediaSource: 'desktop', chromeMediaSourceId: sourceId, - minWidth: 1280, - maxWidth: 1920, - minHeight: 720, - maxHeight: 1080, - maxFrameRate: 30 + maxFrameRate: 15 } } }); diff --git a/main.js b/main.js index f51cf73..bb5892e 100644 --- a/main.js +++ b/main.js @@ -1023,9 +1023,13 @@ ipcMain.on('remote:input-event', (_event, data) => { if (!remote || !remote.allowInput) return; if (data.role !== 'admin') return; - const bounds = mainWindow.getContentBounds(); - const x = Math.round((data.x || 0) * bounds.width); - const y = Math.round((data.y || 0) * bounds.height); + // Capture includes window frame (title bar), but sendInputEvent is relative to content area + const winBounds = mainWindow.getBounds(); + const contentBounds = mainWindow.getContentBounds(); + const frameLeft = contentBounds.x - winBounds.x; + const titleBarHeight = contentBounds.y - winBounds.y; + const x = Math.round((data.x || 0) * winBounds.width - frameLeft); + const y = Math.round((data.y || 0) * winBounds.height - titleBarHeight); switch (data.type) { case 'mousemove': diff --git a/package.json b/package.json index 28ae785..6d2b15b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "multi-hoster-uploader", - "version": "2.1.7", + "version": "2.1.8", "description": "Upload files to doodstream, voe, vidmoly, byse simultaneously", "main": "main.js", "scripts": {