From 470eb364dbe3a0f9ecd1708c31a56dc38f39ff6d Mon Sep 17 00:00:00 2001 From: Feiran Zhang Date: Sun, 30 Mar 2025 13:23:57 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=BF=87=E8=B0=83=E5=BA=A6=E5=99=A8?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E6=97=B6=EF=BC=8C=E6=B7=BB=E5=8A=A0sleep?= =?UTF-8?q?=E9=98=B2=E6=AD=A2=E9=97=AA=E9=80=80=20(#1366)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 发现通过调度器直接原神启动时,进入主界面前有概率闪退,可能是while (true)里的截图太频繁导致,添加sleep后测试该问题已解决 --- BetterGenshinImpact/Service/ScriptService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BetterGenshinImpact/Service/ScriptService.cs b/BetterGenshinImpact/Service/ScriptService.cs index 3d3915b7..96b40ecb 100644 --- a/BetterGenshinImpact/Service/ScriptService.cs +++ b/BetterGenshinImpact/Service/ScriptService.cs @@ -300,9 +300,11 @@ public partial class ScriptService : IScriptService TaskControl.Logger.LogInformation("当前不在游戏主界面,等待进入主界面后执行任务..."); TaskControl.Logger.LogInformation("如果你已经在游戏内的其他界面,请自行退出当前界面(ESC),使当前任务能够继续运行!"); } + + Thread.Sleep(500); } }); } } } -} \ No newline at end of file +}