Fix playing a movie when core is not specified and core is not one we support switching of

#2476
This commit is contained in:
nattthebear 2020-11-12 15:12:00 -05:00
parent 04a60cd0df
commit ebf0f6685e
1 changed files with 8 additions and 1 deletions

View File

@ -204,10 +204,17 @@ namespace BizHawk.Client.Common
if (!record) if (!record)
{ {
if (string.IsNullOrWhiteSpace(movie.Core)) if (string.IsNullOrWhiteSpace(movie.Core))
{
if (preferredCores.TryGetValue(systemId, out var coreName))
{ {
PopupMessage($"No core specified in the movie file, using the preferred core {preferredCores[systemId]} instead."); PopupMessage($"No core specified in the movie file, using the preferred core {preferredCores[systemId]} instead.");
} }
else else
{
PopupMessage($"No core specified in the movie file, using the default core instead.");
}
}
else
{ {
var keys = preferredCores.Keys.ToList(); var keys = preferredCores.Keys.ToList();
foreach (var k in keys) foreach (var k in keys)