Skip to content

Commit

Permalink
Fix Splashscreen only on first start
Browse files Browse the repository at this point in the history
  • Loading branch information
CasperH2O committed Apr 8, 2024
1 parent 913e8e5 commit d15bfc5
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions HandheldCompanion/Views/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,18 @@ public partial class MainWindow : GamepadWindow
public MainWindow(FileVersionInfo _fileVersionInfo, Assembly CurrentAssembly)
{
// initialize splash screen
SplashScreen = new SplashScreen();
#if !DEBUG
SplashScreen.Show();
#endif
SplashScreen = new SplashScreen();

// get first start
bool FirstStart = SettingsManager.GetBoolean("FirstStart");

if (FirstStart)
{
#if !DEBUG
SplashScreen.Show();
#endif
}

SplashScreen.LoadingSequence.Text = "Preparing UI...";

InitializeComponent();
Expand All @@ -105,9 +113,6 @@ public MainWindow(FileVersionInfo _fileVersionInfo, Assembly CurrentAssembly)
// fix touch support
TabletDeviceCollection tabletDevices = Tablet.TabletDevices;

// get first start
bool FirstStart = SettingsManager.GetBoolean("FirstStart");

// define current directory
InstallPath = AppDomain.CurrentDomain.BaseDirectory;
SettingsPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
Expand Down

0 comments on commit d15bfc5

Please sign in to comment.