From 48ddb4c09194c59d19c7c03f3ab1ed28507cfc31 Mon Sep 17 00:00:00 2001 From: DismissedLight <1686188646@qq.com> Date: Sun, 24 Dec 2023 21:50:47 +0800 Subject: [PATCH] code style --- src/Snap.Hutao/Snap.Hutao/Core/Shell/ShellLinkInterop.cs | 3 ++- .../Snap.Hutao/Model/Entity/SettingEntry.Constant.cs | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Snap.Hutao/Snap.Hutao/Core/Shell/ShellLinkInterop.cs b/src/Snap.Hutao/Snap.Hutao/Core/Shell/ShellLinkInterop.cs index 5a6e315e..87e7cc3b 100644 --- a/src/Snap.Hutao/Snap.Hutao/Core/Shell/ShellLinkInterop.cs +++ b/src/Snap.Hutao/Snap.Hutao/Core/Shell/ShellLinkInterop.cs @@ -49,7 +49,8 @@ internal sealed partial class ShellLinkInterop : IShellLinkInterop IShellLinkDataList shellLinkDataList = (IShellLinkDataList)shellLink; shellLinkDataList.GetFlags(out uint flags); - shellLinkDataList.SetFlags(flags | (uint)SHELL_LINK_DATA_FLAGS.SLDF_RUNAS_USER); + flags |= (uint)SHELL_LINK_DATA_FLAGS.SLDF_RUNAS_USER; + shellLinkDataList.SetFlags(flags); string desktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); string target = Path.Combine(desktop, $"{SH.FormatAppNameAndVersion(runtimeOptions.Version)}.lnk"); diff --git a/src/Snap.Hutao/Snap.Hutao/Model/Entity/SettingEntry.Constant.cs b/src/Snap.Hutao/Snap.Hutao/Model/Entity/SettingEntry.Constant.cs index 9ffea7ec..dfe1ccc6 100644 --- a/src/Snap.Hutao/Snap.Hutao/Model/Entity/SettingEntry.Constant.cs +++ b/src/Snap.Hutao/Snap.Hutao/Model/Entity/SettingEntry.Constant.cs @@ -15,6 +15,9 @@ internal sealed partial class SettingEntry public const string GamePathEntries = "GamePathEntries"; + [Obsolete("不再使用 PowerShell")] + public const string PowerShellPath = "PowerShellPath"; + /// /// 空的历史记录卡池是否可见 ///