am/gui: Implement Wake-up message (#1750)
* am/gui: Implement Wake-up message. 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. * Address gdkchan feedback
This commit is contained in:
parent
3332b29f01
commit
808380690c
6 changed files with 45 additions and 26 deletions
|
@ -278,8 +278,10 @@ namespace Ryujinx.HLE.HOS
|
|||
State.DockedMode = e.NewValue;
|
||||
PerformanceState.PerformanceMode = State.DockedMode ? PerformanceMode.Boost : PerformanceMode.Default;
|
||||
|
||||
AppletState.EnqueueMessage(MessageInfo.OperationModeChanged);
|
||||
AppletState.EnqueueMessage(MessageInfo.PerformanceModeChanged);
|
||||
AppletState.Messages.Enqueue(MessageInfo.OperationModeChanged);
|
||||
AppletState.Messages.Enqueue(MessageInfo.PerformanceModeChanged);
|
||||
AppletState.MessageEvent.ReadableEvent.Signal();
|
||||
|
||||
SignalDisplayResolutionChange();
|
||||
|
||||
// Reconfigure controllers
|
||||
|
@ -287,6 +289,12 @@ namespace Ryujinx.HLE.HOS
|
|||
}
|
||||
}
|
||||
|
||||
public void SimulateWakeUpMessage()
|
||||
{
|
||||
AppletState.Messages.Enqueue(MessageInfo.Resume);
|
||||
AppletState.MessageEvent.ReadableEvent.Signal();
|
||||
}
|
||||
|
||||
public void SignalDisplayResolutionChange()
|
||||
{
|
||||
DisplayResolutionChangeEvent.ReadableEvent.Signal();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue