diff --git a/src/ExplorerCore.cs b/src/ExplorerCore.cs index 29a85ac..05acfd9 100644 --- a/src/ExplorerCore.cs +++ b/src/ExplorerCore.cs @@ -87,6 +87,11 @@ namespace Explorer WindowManager.Instance.OnGUI(); InspectUnderMouse.OnGUI(); + if (WindowManager.IsMouseInWindow) + { + InputManager.ResetInputAxes(); + } + GUI.skin = origSkin; } diff --git a/src/Input/InputManager.cs b/src/Input/InputManager.cs index 926d097..8e036c3 100644 --- a/src/Input/InputManager.cs +++ b/src/Input/InputManager.cs @@ -42,6 +42,16 @@ namespace Explorer public static bool GetMouseButtonDown(int btn) => inputModule.GetMouseButtonDown(btn); public static bool GetMouseButton(int btn) => inputModule.GetMouseButton(btn); +#if CPP + internal delegate void d_ResetInputAxes(); + internal static d_ResetInputAxes ResetInputAxes_iCall => + IL2CPP.ResolveICall("UnityEngine.Input::ResetInputAxes"); + + public static void ResetInputAxes() => ResetInputAxes_iCall(); +#else + public static void ResetInputAxes() => UnityEngine.Input.ResetInputAxes(); +#endif + //#if CPP //#pragma warning disable IDE1006 // // public extern static string compositionString { get; }