frontend/api: Fix repeated preview en-/disables not working#12580
frontend/api: Fix repeated preview en-/disables not working#12580WarmUpTill wants to merge 1 commit into
Conversation
|
I feel like this value should be set in EnablePreviewDisplay() itself to prevent these kinds of mistakes |
Objection, That said the correct thing to do here is to call |
5ce432e to
2d3f2f1
Compare
|
Thanks for the feedback!
I have updated the PR accordingly. I am not sure if this is really needed any more after switching to Let me know if you want me to remove it. |
Yeah I agree this seems unnecessary there at first glance, feel free to remove it everything still works correctly without it. Otherwise, the PR looks good to me. |
2d3f2f1 to
8e80e02
Compare
Done. |
RytoEX
left a comment
There was a problem hiding this comment.
Commit message prefix can just be "frontend: " as this does not modify files in frontend/api.
8e80e02 to
30aaabe
Compare
|
I rebased and fixed the conflict on this.
It's still a change to OBSStudioAPI even if that file doesn't live in the api folder. |
Description
Fix
obs_frontend_set_preview_enablednot working when used repeatedly.Motivation and Context
An initial call to
obs_frontend_set_preview_enabledto enable or disable the preview works as expected.However, any subsequent calls to
obs_frontend_set_preview_enabledto change the preview enable state would not work, becausepreviewEnabledwas not updated withinOBSStudioAPI::obs_frontend_set_preview_enabled.This PR sets
previewEnabledto the appropriate value.How Has This Been Tested?
Tested by toggling the preview in a plugin via
obs_frontend_set_preview_enabled.Enabling and disabling the preview via the UI also seems to work as expected still.
Types of changes
Checklist: