node-mac-recorder 2.17.1 → 2.17.2

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.
Files changed (2) hide show
  1. package/index.js +3 -26
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -772,32 +772,9 @@ class MacRecorder extends EventEmitter {
772
772
  let coordinateSystem = "global";
773
773
 
774
774
  if (this.cursorDisplayInfo) {
775
- // CRITICAL FIX: Handle DPR scaling for cursor coordinates
776
- // Get scaling information from native cursor position
777
- const scaleFactor = position.scaleFactor || 1;
778
- const displayInfo = position.displayInfo;
779
-
780
- // Convert logical cursor position to physical (if recording uses physical coordinates)
781
- let physicalX = position.x;
782
- let physicalY = position.y;
783
-
784
- if (scaleFactor > 1.1 && displayInfo) {
785
- // Convert to display-relative logical, then to physical
786
- const displayRelativeX = position.x - displayInfo.displayX;
787
- const displayRelativeY = position.y - displayInfo.displayY;
788
-
789
- // Scale to physical coordinates
790
- const physicalRelativeX = displayRelativeX * scaleFactor;
791
- const physicalRelativeY = displayRelativeY * scaleFactor;
792
-
793
- // Convert back to global physical
794
- physicalX = displayInfo.displayX + physicalRelativeX;
795
- physicalY = displayInfo.displayY + physicalRelativeY;
796
- }
797
-
798
- // Offset'leri çıkar (display veya window) - use physical coordinates
799
- x = physicalX - this.cursorDisplayInfo.x;
800
- y = physicalY - this.cursorDisplayInfo.y;
775
+ // Offset'leri çıkar (display veya window)
776
+ x = position.x - this.cursorDisplayInfo.x;
777
+ y = position.y - this.cursorDisplayInfo.y;
801
778
 
802
779
  if (this.cursorDisplayInfo.windowRelative) {
803
780
  // Window-relative koordinatlar
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-mac-recorder",
3
- "version": "2.17.1",
3
+ "version": "2.17.2",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [