Skip to content

Commit

Permalink
Hotfix Release 0.91
Browse files Browse the repository at this point in the history
Hotfix: Error when starting game under special circumstances
  • Loading branch information
JosefNemec committed May 24, 2017
1 parent 05f9569 commit 81b4ac5
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 11 deletions.
23 changes: 16 additions & 7 deletions source/PlayniteUI/GamesEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@ public void PlayGame(IGame game)
try
{
game.PlayGame();

}
catch (Exception exc)
{
logger.Error(exc, "Cannot start game: ");
MessageBox.Show("Cannot start game: " + exc.Message, "Game Error", MessageBoxButton.OK, MessageBoxImage.Error);
}
finally
{
GameDatabase.Instance.UpdateGameInDatabase(game);
}

try
{
var lastGames = GameDatabase.Instance.Games.OrderByDescending(a => a.LastActivity).Where(a => a.LastActivity != null).Take(10);

var jumpList = new JumpList();
Expand All @@ -101,7 +115,7 @@ public void PlayGame(IGame game)
ApplicationPath = Paths.ExecutablePath
};

if (lastGame.PlayTask.Type == GameTaskType.File)
if (lastGame.PlayTask != null && lastGame.PlayTask.Type == GameTaskType.File)
{
if (string.IsNullOrEmpty(lastGame.PlayTask.WorkingDir))
{
Expand All @@ -122,12 +136,7 @@ public void PlayGame(IGame game)
}
catch (Exception exc)
{
logger.Error(exc, "Cannot start game: ");
MessageBox.Show("Cannot start game: " + exc.Message, "Game Error", MessageBoxButton.OK, MessageBoxImage.Error);
}
finally
{
GameDatabase.Instance.UpdateGameInDatabase(game);
logger.Error(exc, "Failed to set jump list data: ");
}
}

Expand Down
4 changes: 2 additions & 2 deletions source/PlayniteUI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.90.0.0")]
[assembly: AssemblyFileVersion("0.90.0.0")]
[assembly: AssemblyVersion("0.91.0.0")]
[assembly: AssemblyFileVersion("0.91.0.0")]
24 changes: 24 additions & 0 deletions web/update/0.91.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<html lang="en">
<head>
<style type="text/css">
body {
font-family: Trebuchet MS;
font-size: 12;
color: #f2f2f2;
margin: 0px;
padding: 0px;
}

ul {
margin-top: 0px;
margin-bottom: 0px;
}

</style>
</head>
<body>
<ul>
<li>Hotfix: Error when starting game under special circumstances</li>
</ul>
</body>
</html>
8 changes: 6 additions & 2 deletions web/update/update.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"stable" : {
"version" : "0.80",
"url" : "https://github.com/JosefNemec/Playnite/releases/download/0.90/PlayniteInstaller.exe",
"version" : "0.91",
"url" : "https://github.com/JosefNemec/Playnite/releases/download/0.91/PlayniteInstaller.exe",
"notesUrlRoot" : "http://playnite.link/update/",
"releases" : [
{
"version" : "0.91",
"file" : "0.91.html"
},
{
"version" : "0.90",
"file" : "0.90.html"
Expand Down

0 comments on commit 81b4ac5

Please sign in to comment.