Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Window Capture sources #2

Open
BlankSourceCode opened this issue Nov 4, 2023 · 1 comment
Open

Add support for Window Capture sources #2

BlankSourceCode opened this issue Nov 4, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@BlankSourceCode
Copy link
Owner

Currently this script only works with Display Capture sources (aka when you are capturing a whole monitor display in OBS).

My theory is that we could support other sources (such as Window Capture) if we had a reliable way to get the size and offset of that window for use with the mouse position calculations.

We currently get the mouse position in terms of the desktop area, but when you zoom, we need to convert that position into where on the capture source the mouse is. For display captures we use the info given by OBS to parse out the top-left x and y coordinates of the monitor you are using. So when you click at 1921, 0 we know that is really pixel 0,0 on the second monitor because it starts at x 1921.

Would probably require some refactoring of the script especially around the refresh_sceneitem function.

@BlankSourceCode BlankSourceCode added the enhancement New feature or request label Nov 4, 2023
@BlankSourceCode
Copy link
Owner Author

This sort of works due to #9 but you have to manually set the position/size of the source window. Which means if you move the window, you'd have to update the zoom settings again which isn't ideal, but it's at least possible now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant