Skip to content

Commit 5408c82

Browse files
committed
Supported more resolution NOT limited to1440x900
1 parent 579aa9a commit 5408c82

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/GenshinWoodmen/Core/JiggingProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public static async void Processing()
122122
Count();
123123
await Delay(200);
124124
TraceStatus("Got Wood");
125-
await Delay(100);
125+
await Delay(800);
126126
TraceStatus("Logout");
127127
await LaunchCtrl.Logout();
128128
lastAutoLogout = true;

src/GenshinWoodmen/Core/LaunchCtrl.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,17 @@ public static async Task<bool> Logout()
8383
{
8484
IntPtr hwnd = p!.MainWindowHandle;
8585

86-
await JiggingProcessor.Delay(1000);
8786
NativeMethods.Focus(hwnd);
8887
NativeMethods.CursorCenterPos(hwnd);
8988
UserSimulator.Input.Keyboard.KeyPress(VirtualKeyCode.ESCAPE);
90-
await JiggingProcessor.Delay(1000);
89+
await JiggingProcessor.Delay(950);
9190
RECT rect = NativeMethods.GetWindowRECT(hwnd);
9291
NativeMethods.SetCursorPos(rect.Left + 20, rect.Bottom - SystemInformation.CaptionHeight - 10);
9392
await JiggingProcessor.Delay(100);
9493
UserSimulator.Input.Mouse.LeftButtonClick(); // ExitButton
95-
await JiggingProcessor.Delay(1000);
96-
NativeMethods.SetCursorPos(rect.Left + (int)((rect.Right - rect.Left) / 2d) + 70, rect.Top + (int)((rect.Bottom - rect.Top) / 2d) + 170);
94+
await JiggingProcessor.Delay(800);
95+
(double cx, double cy) = ((rect.Right - rect.Left) / 2d, (rect.Bottom - rect.Top) / 2d);
96+
NativeMethods.SetCursorPos(rect.Left + (int)(cx * 1.1d), rect.Top + (int)(cy * 1.4d));
9797
await JiggingProcessor.Delay(100);
9898
UserSimulator.Input.Mouse.LeftButtonClick(); // OKButton
9999
});

0 commit comments

Comments
 (0)