From 435f9ffad8b87ae29f1735a200a5838e961163bd Mon Sep 17 00:00:00 2001
From: gdkchan <gab.dark.100@gmail.com>
Date: Fri, 13 Apr 2018 17:39:45 -0300
Subject: [PATCH] [HLE] Fix hid issues on some games

---
 Ryujinx.Core/Hid/Hid.cs | 2 +-
 Ryujinx/Ui/GLScreen.cs  | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Ryujinx.Core/Hid/Hid.cs b/Ryujinx.Core/Hid/Hid.cs
index f25a943752..48f309d848 100644
--- a/Ryujinx.Core/Hid/Hid.cs
+++ b/Ryujinx.Core/Hid/Hid.cs
@@ -219,7 +219,7 @@ namespace Ryujinx.Core.Input
                     Memory.WriteInt64Unchecked(TouchScreenOffset + 0x8,  HidEntryCount);
                     Memory.WriteInt64Unchecked(TouchScreenOffset + 0x10, CurrEntry);
                     Memory.WriteInt64Unchecked(TouchScreenOffset + 0x18, HidEntryCount - 1);
-                    Memory.WriteInt64Unchecked(TouchScreenOffset + 0x20, Timestamp);            
+                    Memory.WriteInt64Unchecked(TouchScreenOffset + 0x20, Timestamp);
 
                     long TouchEntryOffset = TouchScreenOffset + HidTouchHeaderSize;
 
diff --git a/Ryujinx/Ui/GLScreen.cs b/Ryujinx/Ui/GLScreen.cs
index 49338247e2..8ccbebfa5b 100644
--- a/Ryujinx/Ui/GLScreen.cs
+++ b/Ryujinx/Ui/GLScreen.cs
@@ -154,6 +154,13 @@ namespace Ryujinx
                 Ns.Hid.SetTouchPoints();
             }
 
+            Ns.Hid.SetJoyconButton(
+                HidControllerId.CONTROLLER_HANDHELD,
+                HidControllerLayouts.Handheld_Joined,
+                CurrentButton,
+                LeftJoystick,
+                RightJoystick);
+
             Ns.Hid.SetJoyconButton(
                 HidControllerId.CONTROLLER_HANDHELD,
                 HidControllerLayouts.Main,