diff options
author | riperiperi <rhy3756547@hotmail.com> | 2021-04-17 17:57:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-17 18:57:03 +0200 |
commit | dc8c781d7a8a6778e493cca798cf2a7d298983de (patch) | |
tree | d2a37afff3f6acee49f55263034154ba6893ccf7 /Ryujinx.HLE | |
parent | 84415eaf003c2c31ed8a7745863533910cebf73f (diff) |
Return focus from controller applet after completion (#2218)
* Return focus from controller applet after completion
This fixes controller applet related in Mario Kart 8 Deluxe, in 2 player mode or when opening the applet in character select.
* Return focus for player select
Diffstat (limited to 'Ryujinx.HLE')
-rw-r--r-- | Ryujinx.HLE/HOS/Applets/Controller/ControllerApplet.cs | 2 | ||||
-rw-r--r-- | Ryujinx.HLE/HOS/Applets/PlayerSelect/PlayerSelectApplet.cs | 2 | ||||
-rw-r--r-- | Ryujinx.HLE/HOS/Horizon.cs | 5 |
3 files changed, 9 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Applets/Controller/ControllerApplet.cs b/Ryujinx.HLE/HOS/Applets/Controller/ControllerApplet.cs index 4f806225..fd89e8f6 100644 --- a/Ryujinx.HLE/HOS/Applets/Controller/ControllerApplet.cs +++ b/Ryujinx.HLE/HOS/Applets/Controller/ControllerApplet.cs @@ -105,6 +105,8 @@ namespace Ryujinx.HLE.HOS.Applets _normalSession.Push(BuildResponse(result)); AppletStateChanged?.Invoke(this, null); + _system.ReturnFocus(); + return ResultCode.Success; } diff --git a/Ryujinx.HLE/HOS/Applets/PlayerSelect/PlayerSelectApplet.cs b/Ryujinx.HLE/HOS/Applets/PlayerSelect/PlayerSelectApplet.cs index 9cfe0253..7d77b83c 100644 --- a/Ryujinx.HLE/HOS/Applets/PlayerSelect/PlayerSelectApplet.cs +++ b/Ryujinx.HLE/HOS/Applets/PlayerSelect/PlayerSelectApplet.cs @@ -30,6 +30,8 @@ namespace Ryujinx.HLE.HOS.Applets AppletStateChanged?.Invoke(this, null); + _system.ReturnFocus(); + return ResultCode.Success; } diff --git a/Ryujinx.HLE/HOS/Horizon.cs b/Ryujinx.HLE/HOS/Horizon.cs index 0f66192a..fa88d775 100644 --- a/Ryujinx.HLE/HOS/Horizon.cs +++ b/Ryujinx.HLE/HOS/Horizon.cs @@ -330,6 +330,11 @@ namespace Ryujinx.HLE.HOS } } + public void ReturnFocus() + { + AppletState.SetFocus(true); + } + public void SimulateWakeUpMessage() { AppletState.Messages.Enqueue(MessageInfo.Resume); |