From 01ca2090fc33db56cfeaae9fb50407378cf7d770 Mon Sep 17 00:00:00 2001 From: status102 <102887808+status102@users.noreply.github.com> Date: Thu, 26 Feb 2026 15:41:22 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20Wpf=20=E5=A2=9E=E5=8A=A0=E6=9C=AA?= =?UTF-8?q?=E6=89=BE=E5=88=B0=20CrashDumps=20=E6=96=87=E4=BB=B6=E5=A4=B9?= =?UTF-8?q?=20Log,=20correct=5Frect=20=E5=A2=9E=E5=8A=A0=20rect.empty()=20?= =?UTF-8?q?log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaCore/Vision/VisionHelper.cpp | 1 + src/MaaWpfGui/Main/Bootstrapper.cs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/MaaCore/Vision/VisionHelper.cpp b/src/MaaCore/Vision/VisionHelper.cpp index 16a28bc82b..79804adeb7 100644 --- a/src/MaaCore/Vision/VisionHelper.cpp +++ b/src/MaaCore/Vision/VisionHelper.cpp @@ -81,6 +81,7 @@ Rect VisionHelper::correct_rect(const Rect& rect, const cv::Mat& image) return rect; } if (rect.empty()) { + LogWarn << __FUNCTION__ << "roi is empty, use whole image"; return { 0, 0, image.cols, image.rows }; } if (rect.x >= image.cols || rect.y >= image.rows) { diff --git a/src/MaaWpfGui/Main/Bootstrapper.cs b/src/MaaWpfGui/Main/Bootstrapper.cs index cd701c86a3..7f2fae7a43 100644 --- a/src/MaaWpfGui/Main/Bootstrapper.cs +++ b/src/MaaWpfGui/Main/Bootstrapper.cs @@ -221,6 +221,10 @@ public class Bootstrapper : Bootstrapper _logger.Information("Crash dumps are copied to {DumpDir}", dumpDir); } } + else + { + _logger.Information("%LocalAppData%/CrashDumps not found"); + } string[] lines = File.ReadAllLines(crashFile, Encoding.UTF8);