From 4f775a04fdebdf6976794a1ea01f7868b8a135b3 Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Mon, 21 Jul 2025 01:14:08 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=20gpu=20=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/Main/AsstProxy.cs | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/MaaWpfGui/Main/AsstProxy.cs b/src/MaaWpfGui/Main/AsstProxy.cs index 7547932715..da4316b094 100644 --- a/src/MaaWpfGui/Main/AsstProxy.cs +++ b/src/MaaWpfGui/Main/AsstProxy.cs @@ -417,12 +417,24 @@ namespace MaaWpfGui.Main { if (GpuOption.GetCurrent() is GpuOption.EnableOption x) { - if (x.IsDeprecated && !GpuOption.AllowDeprecatedGpu) - { - Instances.TaskQueueViewModel.AddLog(string.Format(LocalizationHelper.GetString("GpuDeprecatedMessage"), x.GpuInfo?.Description), UiLogColor.Warning); - } + var info = x.GpuInfo; + var description = info?.Description; + var version = info?.DriverVersion; + var date = info?.DriverDate?.ToString("yyyy-MM-dd"); - _logger.Information("Using GPU {0} (Driver {1} {2})", x.GpuInfo?.Description, x.GpuInfo?.DriverVersion, x.GpuInfo?.DriverDate?.ToString("yyyy-MM-dd")); + if (x.IsDeprecated) + { + if (!GpuOption.AllowDeprecatedGpu) + { + Instances.TaskQueueViewModel.AddLog(string.Format(LocalizationHelper.GetString("GpuDeprecatedMessage"), description), UiLogColor.Warning); + } + + _logger.Warning("Using deprecated GPU {0} (Driver {1} {2})", description, version, date); + } + else + { + _logger.Information("Using GPU {0} (Driver {1} {2})", description, version, date); + } AsstSetStaticOption(AsstStaticOptionKey.GpuOCR, x.Index.ToString()); }