diff --git a/source/Playnite.FullscreenApp/FullscreenApplication.cs b/source/Playnite.FullscreenApp/FullscreenApplication.cs index 630302c33..3dbe4db80 100644 --- a/source/Playnite.FullscreenApp/FullscreenApplication.cs +++ b/source/Playnite.FullscreenApp/FullscreenApplication.cs @@ -41,7 +41,7 @@ public FullscreenAppViewModel MainModel } } - private SplashScreen splashScreen; + private ExtendedSplashScreen splashScreen; private bool sdlInitialized = false; public static AudioEngine Audio { get; private set; } public static IntPtr NavigateSound { get; private set; } @@ -55,10 +55,10 @@ public FullscreenAppViewModel MainModel get => PlayniteApplication.Current == null ? null : (FullscreenApplication)PlayniteApplication.Current; } - public FullscreenApplication(Func appInitializer, SplashScreen splashScreen, CmdLineOptions cmdLine) + public FullscreenApplication(Func appInitializer, ExtendedSplashScreen splashScreen, CmdLineOptions cmdLine) : base(appInitializer, ApplicationMode.Fullscreen, cmdLine) { - this.splashScreen = splashScreen; + this.splashScreen = splashScreen; } public override void ConfigureViews() @@ -161,11 +161,13 @@ private async void OpenMainViewAsync() Extensions.LoadScripts(AppSettings.DisabledPlugins, CmdLine.SafeStartup, AppSettings.DevelExtenions.Where(a => a.Selected == true).Select(a => a.Item).ToList()); OnExtensionsLoaded(); - splashScreen?.Close(new TimeSpan(0)); MainModel.OpenView(); CurrentNative.MainWindow = MainModel.Window.Window; - await MainModel.ProcessStartupLibUpdate(); + CurrentNative.MainWindow.Activate(); + splashScreen?.Close(new TimeSpan(0)); + await MainModel.ProcessStartupLibUpdate(); + // This is most likely safe place to consider application to be started properly FileSystem.DeleteFile(PlaynitePaths.SafeStartupFlagFile); } diff --git a/source/Playnite.FullscreenApp/HiddenStyles.xaml b/source/Playnite.FullscreenApp/HiddenStyles.xaml index 12a338892..909145898 100644 --- a/source/Playnite.FullscreenApp/HiddenStyles.xaml +++ b/source/Playnite.FullscreenApp/HiddenStyles.xaml @@ -25,7 +25,7 @@