diff --git a/BetterGenshinImpact/View/Pages/HomePage.xaml b/BetterGenshinImpact/View/Pages/HomePage.xaml index 25a5e356..4617e0ad 100644 --- a/BetterGenshinImpact/View/Pages/HomePage.xaml +++ b/BetterGenshinImpact/View/Pages/HomePage.xaml @@ -103,7 +103,7 @@ - + diff --git a/BetterGenshinImpact/ViewModel/Pages/HomePageViewModel.cs b/BetterGenshinImpact/ViewModel/Pages/HomePageViewModel.cs index 3508fcd7..27e2f683 100644 --- a/BetterGenshinImpact/ViewModel/Pages/HomePageViewModel.cs +++ b/BetterGenshinImpact/ViewModel/Pages/HomePageViewModel.cs @@ -147,10 +147,10 @@ public partial class HomePageViewModel : ObservableObject, INavigationAware var hWnd = SystemControl.FindGenshinImpactHandle(); if (hWnd == IntPtr.Zero) { - //if (!string.IsNullOrEmpty(Config.InstallPath)) - //{ - // hWnd = await SystemControl.StartFromLocalAsync(Config.InstallPath); - //} + if (!string.IsNullOrEmpty(Config.InstallPath)) + { + hWnd = await SystemControl.StartFromLocalAsync(Config.InstallPath); + } if (hWnd == IntPtr.Zero) { System.Windows.MessageBox.Show("未找到原神窗口,请先启动原神!");