This commit is contained in:
Halgari 2022-10-19 11:28:07 -06:00
parent d85f16cda4
commit 8fe943e4a4
2 changed files with 52 additions and 18 deletions

View File

@ -1,5 +1,8 @@
### Changelog
#### Version - 3.0.2.1 - 10/19/2022
* HOTFIX: make game detection more safe against crashes
#### Version - 3.0.2.0 - 10/19/2022
* Show Modlist readmes after install
* Basic support for commandline options in the WPF app

View File

@ -139,33 +139,64 @@ public class GameLocator : IGameLocator
{
var metaData = game.MetaData();
try
{
foreach (var id in metaData.SteamIDs)
{
if (!_steamGames.TryGetValue(id, out var found)) continue;
path = found;
return true;
}
}
catch (Exception ex)
{
_logger.LogInformation(ex, "During Steam detection");
}
try
{
foreach (var id in metaData.GOGIDs)
{
if (!_gogGames.TryGetValue(id, out var found)) continue;
path = found;
return true;
}
}
catch (Exception ex)
{
_logger.LogInformation(ex, "During GOG detection");
}
try
{
foreach (var id in metaData.EpicGameStoreIDs)
{
if (!_egsGames.TryGetValue(id, out var found)) continue;
path = found;
return true;
}
}
catch (Exception ex)
{
_logger.LogInformation(ex, "During Epic detection");
}
try
{
foreach (var id in metaData.OriginIDs)
{
if (!_originGames.TryGetValue(id, out var found)) continue;
path = found;
return true;
}
}
catch (Exception ex)
{
_logger.LogInformation(ex, "During Origin Store detection");
}
path = default;
return false;