Skip to content

Commit

Permalink
Reduced Sleep on Insert a bit and added Sleep on remove to fix timing…
Browse files Browse the repository at this point in the history
… Issues.
  • Loading branch information
NightHammer1000 committed Nov 24, 2023
1 parent 3a858bb commit e8769fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions MicroSDInstallStatusUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public override void OnApplicationStarted(OnApplicationStartedEventArgs args)
private void SDCardRemoved(object sender, EventArrivedEventArgs e)
{
logger.Info("[SDCardInstallStatusUpdater] SDCard Removed! Updating Database!");
Thread.Sleep(2000);
foreach (var game in PlayniteApi.Database.Games)
{
var InstallDir = game.InstallDirectory;
Expand All @@ -75,7 +76,7 @@ private void SDCardRemoved(object sender, EventArrivedEventArgs e)
private void SDCardInserted(object sender, EventArrivedEventArgs e)
{
logger.Info("[SDCardInstallStatusUpdater] SDCard Inserted! Sleeping a bit to let Windows handle and mount shit :3 Updating Database!");
Thread.Sleep(5000);
Thread.Sleep(2000);
logger.Info("[SDCardInstallStatusUpdater] Sleep Done! Updating Database!");
foreach (var game in PlayniteApi.Database.Games)
{
Expand Down Expand Up @@ -106,4 +107,4 @@ public override UserControl GetSettingsView(bool firstRunSettings)
return new MicroSDInstallStatusUpdaterSettingsView();
}
}
}
}

0 comments on commit e8769fa

Please sign in to comment.