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

VideoCommon/OSD: Process OSD messages even when they are disabled. #8582

Merged
merged 1 commit into from Jan 25, 2020

Conversation

jordan-woyak
Copy link
Member

When OSD messages were disabled message handling was completely skipped and s_messages filled up indefinitely.
Now timeouts are still processed and only the actual drawing is skipped.

@BhaaLseN
Copy link
Member

Is there any particular reason why we don't simply skip adding it to the message list in first place (up in AddMessage/AddTypedMessage)?
I'm also not too sure on why the timeouts need to be processed (vs. just clearing the collection), since no drawing is being done and as far as I can tell there is no callbacks (or other notifications) that occur when the message disappears.

@jordan-woyak
Copy link
Member Author

jordan-woyak commented Jan 24, 2020

@BhaaLseN Clearing the collection when OSD messages are disabled would "work" but enabling OSD messages after having been disabled wouldn't show possibly still relevant messages. It's something not really important to worry about, but I think processing them as normal and simply not drawing them is the correct behavior.

This way toggling the setting on and off when messages currently exist does the expected thing of hiding and showing them in real time while the setting is toggled.

@Tilka
Copy link
Member

Tilka commented Jan 25, 2020

I find the use of continue a bit irritating here. Why not draw first and then erase? Nevermind, it's technically more correct since you avoid drawing expired messages for one more frame.

@Tilka Tilka merged commit 2edcb29 into dolphin-emu:master Jan 25, 2020
@jordan-woyak jordan-woyak deleted the osd-disabled-fix branch January 25, 2020 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants