Closed hrueger closed 4 years ago
Thank you!
Cutted pixels was caused by window title bar and borders being accounted in window width and height. Fixed this by specifying useContentSize
window option. See https://github.com/Envek/obs-studio-node-example/commit/64c2f861e732d27946c523591a6ffa31185b77bf
Also I moved preview right into main window (with some dirty hacks) in https://github.com/Envek/obs-studio-node-example/commit/5149f39935c5b3c55bc31502e832d8c86da8fd88
@hrueger, can you please check how it works on your machine? That there is no scaling issues or similar?
It's working great @Envek ! On a scaled screen it works, too. I just found two problems:
When I move the window from a scaled to a secondary non-scaled screen, the preview overflows the rest of the window. But I don't know how to detect when the scaling changed...
I have some small black bars around my screen in the preview window, as shown here:
Oh, nice, thank you very much for testing it!
Created separate issue about scaling.
I have some small black bars around my screen in the preview window
I think that's because preview window is a bit wider than video itself and OBS fills it with some color. I've seen a function to change this background color somewhere in obs-studio-node.
OK, I fixed issue 1 by making the preview window a child window of the main window. That way it is automatically closed once the main window is closed. And I fixed 2 and 3.
However, I wasn't able to get the scaling working, it always cut off some parts (the taskbar) and I didn't want to just add a random value because this can't be the correct way.