diff --git a/src/Ryujinx/AppHost.cs b/src/Ryujinx/AppHost.cs index f4bfd1169..8e0ec9cc6 100644 --- a/src/Ryujinx/AppHost.cs +++ b/src/Ryujinx/AppHost.cs @@ -89,6 +89,7 @@ internal class AppHost private float _newVolume; private KeyboardHotkeyState _prevHotkeyState; + private Point? _lastCursorPoint; private long _lastCursorMoveTime; private bool _isCursorInRenderer = true; private bool _ignoreCursorState = false; @@ -221,12 +222,13 @@ private void TopLevel_PointerEnteredOrMoved(object sender, PointerEventArgs e) if (sender is MainWindow window) { - if (ConfigurationState.Instance.HideCursor.Value == HideCursorMode.OnIdle) + var point = e.GetCurrentPoint(window).Position; + + if (ConfigurationState.Instance.HideCursor.Value == HideCursorMode.OnIdle && (_lastCursorPoint == null || _lastCursorPoint != point)) { _lastCursorMoveTime = Stopwatch.GetTimestamp(); } - var point = e.GetCurrentPoint(window).Position; var bounds = RendererHost.EmbeddedWindow.Bounds; var windowYOffset = bounds.Y + window.MenuBarHeight; var windowYLimit = (int)window.Bounds.Height - window.StatusBarHeight - 1; @@ -244,6 +246,7 @@ private void TopLevel_PointerEnteredOrMoved(object sender, PointerEventArgs e) !_viewModel.IsSubMenuOpen; _ignoreCursorState = false; + _lastCursorPoint = point; } }