Use OBS canvas size as browser source default size #178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a minor QoL change to make browser sources default to be the same size as the user's OBS canvas. For users using overlays, this should reduce the work required to add a browser source for an overlay. For all other use cases, this should not create extra work.
If the canvas width and height are not defined (I don't know why this would happen), the width and height should fallback to 800x600. Feedback on this particular section of code would be appreciated.
This PR depends on obsproject/obs-studio#2073 to maintain backwards compatibility with previously created browser sources that did not have a width and height different from the default specified.
Motivation and Context
At TwitchCon, some users expressed that having browser sources default to the same size as the OBS canvas would save them time/work for setting up scenes using browser source based overlays.
How Has This Been Tested?
I compiled and tested this on Windows 10 Home 1903 (Build 18362.388) 64-bit.
Before this change, a new browser source defaults to width 800 and height 600.
After this change, a new browser source defaults to the width and height of the OBS canvas.
Types of changes
Checklist: