node-mac-recorder 1.16.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +3 -1
- package/index.js +3 -19
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -541,27 +541,11 @@ class MacRecorder extends EventEmitter {
|
|
|
541
541
|
// Koordinat sistemi belirle: window-relative, display-relative veya global
|
|
542
542
|
if (options.windowRelative && options.windowInfo) {
|
|
543
543
|
// Window-relative koordinatlar için pencere bilgilerini kullan
|
|
544
|
-
// Y
|
|
545
|
-
const displays = await this.getDisplays();
|
|
546
|
-
const display = displays.find(d => d.id === options.windowInfo.displayId) || displays[0];
|
|
547
|
-
|
|
548
|
-
let adjustedX = options.windowInfo.x || 0;
|
|
549
|
-
let adjustedY = options.windowInfo.y || 0;
|
|
550
|
-
|
|
551
|
-
if (display) {
|
|
552
|
-
// Pencere koordinatlarını display-relative yapmak için display offset'ini çıkar
|
|
553
|
-
adjustedX = (options.windowInfo.x || 0) - display.x;
|
|
554
|
-
|
|
555
|
-
// Y koordinat dönüşümü: CGWindow (top-left) to AVFoundation (bottom-left)
|
|
556
|
-
const displayHeight = parseInt(display.resolution.split("x")[1]);
|
|
557
|
-
const convertedY = displayHeight - (options.windowInfo.y || 0) - options.windowInfo.height;
|
|
558
|
-
adjustedY = Math.max(0, convertedY - display.y);
|
|
559
|
-
}
|
|
560
|
-
|
|
544
|
+
// Cursor pozisyonu için Y dönüşümü YAPMA - sadece window offset'ini çıkar
|
|
561
545
|
this.cursorDisplayInfo = {
|
|
562
546
|
displayId: options.windowInfo.displayId || null,
|
|
563
|
-
x:
|
|
564
|
-
y:
|
|
547
|
+
x: options.windowInfo.x || 0,
|
|
548
|
+
y: options.windowInfo.y || 0,
|
|
565
549
|
width: options.windowInfo.width,
|
|
566
550
|
height: options.windowInfo.height,
|
|
567
551
|
windowRelative: true,
|