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

fix setDrawsNotificationsAutomatically #9

Closed
wants to merge 2 commits into from
Closed

fix setDrawsNotificationsAutomatically #9

wants to merge 2 commits into from

Conversation

acarabott
Copy link
Contributor

Fixes #8

Previously setting this to false would prevent the server from being visible, as updatedThisFrame was only set to false in draw. If drawing was disabled this would never happen, and updateServer wouldn't be called.

It appears that updatedThisFrame was redundant, as it was only used to prevent calls to updateServer on the main thread when the server was set to threaded mode; threadedUpdate takes care of this well enough.

This update also moves the ofAddListener to draw to setDrawsNotificationsAutomatically so that it can be changed on the fly, enabling/disabling notification drawing before or after setup.

Arthur Carabott added 2 commits August 27, 2014 12:52
this prevented updateServer from being called when draw was disabled
no longer necessary as threadedUpdate will prevent calling
updateServer on the main thread when in threaded mode
calls ofAddListener/ofRemoveListener in setDrawNotificationsAutomatically
this way it can be called before or after setup
@armadillu
Copy link
Owner

Hey thx for this! notifications were being drawn regardless of OFX_REMOTEUI_SERVER_SET_DRAWS_NOTIF(); but your fix would disable the whole UI drawing entirely.

The redundant bool is a good catch!

Im going to close this and fix it on my end

@acarabott
Copy link
Contributor Author

Nice fix, glad to help, really liking this addon.

@armadillu
Copy link
Owner

thx glad you find it useful!

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

Successfully merging this pull request may close these issues.

server not visible with drawNotifications = false
2 participants