Open darkvertex opened 1 year ago
What exactly is happening? I'm assuming that it's not recording the specific region you've selected. I'm aware that using display scaling in general will normally cause an issue where the region you've selected won't be what's recorded. I'm still looking into a solution for display scaling.
That's basically it, but I figured out another curious detail:
If you press the button to select the region, and drag the translucent window from the screen it appeared in to another screen with different display scaling %, the window "pops" briefly as it transitions between screens, looking correct.. but then when you Save, it's totally the wrong region. The part that it records is like the top right of that monitor for me, in a totally different place.
I tried moving the main window between monitors but the "region picker" always spawned on my "primary" monitor.
Perhaps if it spawned on the monitor the app window is in, maybe the scaling would be more correct?
The issue is specifically caused by me not taking into account display scaling currently. Electron uses units that are scaled based on the display scaling factor. But gdigrab, the ffmpeg module we use to capture the screen on windows does not use display scaling.
However, accounting for this is difficult due to oddities in the way that Electron handles things. I believe that an issue with electron is making it difficult to support display scaling the way I'd like to. (Possibly this issue, I'm not certain: https://github.com/electron/electron/issues/10862)
I'm still digging into it, but it might be some time before display scaling is fully supported.
Given how long this underlying issue with Electron has remained unaddressed, I'm considering moving this project to an alternative like Lorca or Wails.
I suspect maybe it has something to do with the fact my Windows "Display Scaling" is set to 125% on my primary monitor and 150% on my secondary monitor. My second monitor is rotated sideways to look vertical, if it makes a difference.