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

RetroAchievements - Add Rich Presence to Achievement Dialog Header #12028

Merged
merged 1 commit into from Sep 6, 2023

Conversation

LillyJadeKatrin
Copy link
Contributor

This refactors the Rich Presence generation to store to a member field that can be exposed to the UI to display the Rich Presence in the achievement header. It still updates at its original rate of once per two minutes, but calls an update on the dialog when that ticks.

@LillyJadeKatrin LillyJadeKatrin changed the title Add Rich Presence to Achievement Dialog Header RetroAchievements - Add Rich Presence to Achievement Dialog Header Jul 3, 2023
@LillyJadeKatrin LillyJadeKatrin force-pushed the retroachievements-bugfix branch 2 times, most recently from fc8f88b to 49e041d Compare July 3, 2023 04:50
Source/Core/Core/AchievementManager.cpp Outdated Show resolved Hide resolved
Source/Core/Core/AchievementManager.h Outdated Show resolved Hide resolved
Copy link
Contributor

@iwubcode iwubcode left a comment

Choose a reason for hiding this comment

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

LGTM. Untested

@AdmiralCurtiss
Copy link
Contributor

I don't understand the threading model here anymore. Can DoFrame() run outside of the CPU thread?

@AdmiralCurtiss
Copy link
Contributor

What happens if the Rich Presence is updated while the GUI is painting it?

@LillyJadeKatrin
Copy link
Contributor Author

I don't understand the threading model here anymore. Can DoFrame() run outside of the CPU thread?

DoFrame should only be called by the CPU thread and shouldn't be called anywhere else, I believe. Aside from that, I don't know if I understand the concern.

What happens if the Rich Presence is updated while the GUI is painting it?

I can mutex it, I think I forgot.

@LillyJadeKatrin LillyJadeKatrin force-pushed the retroachievements-bugfix branch 3 times, most recently from c7ed720 to 5890e6f Compare August 16, 2023 11:13
@AdmiralCurtiss
Copy link
Contributor

Needs a rebase.

This refactors the Rich Presence generation to store to a member field that can be exposed to the UI to display the Rich Presence in the achievement header. It still updates at its original rate of once per two minutes, but calls an update on the dialog when that ticks.
@JMC47 JMC47 merged commit 3b5b9e0 into dolphin-emu:master Sep 6, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants