From c43c520b195a20587a9dd9c625974ca41f688acc Mon Sep 17 00:00:00 2001 From: hawkeye Date: Mon, 4 Sep 2023 21:24:57 -0400 Subject: [PATCH] Add failure condition for loading custom camera view --- WindowsAgent/InputEmulationManager.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/WindowsAgent/InputEmulationManager.cs b/WindowsAgent/InputEmulationManager.cs index c6ad2cf..cde1a79 100644 --- a/WindowsAgent/InputEmulationManager.cs +++ b/WindowsAgent/InputEmulationManager.cs @@ -55,6 +55,13 @@ namespace MSFSPopoutPanelManager.WindowsAgent LeftClick(x, y); + // Force cursor reset + PInvoke.SetCursorPos(x + 1, y); + Thread.Sleep(100); + + PInvoke.SetCursorPos(x, y); + Thread.Sleep(300); + if (useSecondaryKeys) { InputSimulator.Keyboard.KeyDown(WindowsInput.Native.VirtualKeyCode.LCONTROL);