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

image-source: Set minimal size for color source to 1 pixel #11916

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

exeldro
Copy link
Contributor

@exeldro exeldro commented Mar 3, 2025

Description

Set minimal size for color source to 1 pixel

Motivation and Context

OBS can't create draw a sprite without a width/height and will complain about it in the OBS log file.

How Has This Been Tested?

On windows 11 by checking the OBS log file

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

Copy link
Member

@gxalpha gxalpha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it in addition it would also make sense to test (and, if necessary, clamp) the values in the update method to prevent the behavior via plugins/websockets, not just the UI.

@Warchamp7
Copy link
Member

Warchamp7 commented Mar 4, 2025

The UI shouldn't allow bad values, I agree with that.

But can this also be adjusted on the libobs side as well to not try to create an invalid sprite?

@exeldro
Copy link
Contributor Author

exeldro commented Mar 4, 2025

Added check in color_source_update

@WizardCM WizardCM added the Bug Fix Non-breaking change which fixes an issue label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Non-breaking change which fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants