-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
am/gui: Implement Wake-up message #1750
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The UI stuff is good, I'm not sure about the change to enqueueing messages.
AppletState.EnqueueMessage(MessageInfo.Resume);
Definitely seems nicer than:
AppletState.Messages.Enqueue(MessageInfo.Resume);
AppletState.MessageEvent.ReadableEvent.Signal();
EnqueueMessage(MessageInfo.FocusStateChanged); | ||
} | ||
|
||
public void EnqueueMessage(MessageInfo message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have these been moved out of this class? Surely signalling the event after each enqueue is desirable, and easier to do if you only have to use one line to do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because AM service signal the event if messages left in the buffer (checked by RE).
We currently do that outside of the AM service which is wrong. That’s why I’ve moved the logic in the service call and remove unused methods.
...S/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ICommonStateGetter.cs
Outdated
Show resolved
Hide resolved
This implement the ability to send a Wake-up (Resume) message to the guest. Sometime games needs to Sleep and Wake-up the switch to unlock some ingame features.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks.
This implement the ability to send a Wake-up (Resume) message to the guest.
Some games needs to sleep and wake-up the switch to unlock some ingame features, we now supports that.
I've cleaned up the
AppletState
class andICommonStateGetter::ReceiveMessage
call is implemented accordingly to RE.(Thanks to Ryushu on Discord for helping me to reproduce the issue)