Hide rich presence during sleep and track real playtime (#11) - #12
Merged
Conversation
Owner
|
no idea why the workflow failed |
Contributor
Author
|
I don't think it's the code! Devkitpro's server just blocks the GitHub runners sometimes, so it fails while installing the packages before it even builds anything. Seems pretty random too, one of your older builds failed then worked fine on a re-run, so just re-running it should do the trick :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11.
The elapsed timer used to keep running the whole time the console was asleep. Now the presence is hidden during sleep and comes back on wake, and the timer tracks real playtime; it resumes where it left off (sleep excluded, like you suggested) instead of resetting to 0. Sleep/wake is detected via PSC, since the sysmodule is frozen during sleep and no clock works there.
Also fixed a few things I ran into along the way: a double free that crashed at startup, logout not actually stopping the presence, and sessions stacking up when switching game.
Tested on hardware :)