Skip to content

Commit

Permalink
Fixed a couple of UI hangs
Browse files Browse the repository at this point in the history
  • Loading branch information
Asnivor committed Oct 12, 2016
1 parent 7980671 commit 69b2ebc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion MedLaunch/Classes/GameScanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ where a.EndsWith(s)
// check whether game already exists (by gameName and systemId)
Game chkGame = (from g in Games
where g.systemId == systemId && g.gameName == romName
select g).SingleOrDefault();
select g).FirstOrDefault();

if (chkGame == null)
{
Expand Down
11 changes: 7 additions & 4 deletions MedLaunch/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,15 @@ await Task.Run(async () =>

}


controller.SetMessage(output + "\nUpdating Database");
rs.SaveToDatabase();
await Task.Run(() =>
{
controller.SetMessage(output + "\nUpdating Database");
rs.SaveToDatabase();
});



await Task.Delay(1000);
await Task.Delay(500);



Expand Down

0 comments on commit 69b2ebc

Please sign in to comment.