From 5626473fbfed091a3581ca03818301ad4496b5a6 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 8 Feb 2015 20:28:57 +0000 Subject: [PATCH] When adding firmware info to movies, don't attempt to add duplicate keys --- .../movie/conversions/MovieConversionExtensions.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.Common/movie/conversions/MovieConversionExtensions.cs b/BizHawk.Client.Common/movie/conversions/MovieConversionExtensions.cs index 39efd5e743..752cecfc72 100644 --- a/BizHawk.Client.Common/movie/conversions/MovieConversionExtensions.cs +++ b/BizHawk.Client.Common/movie/conversions/MovieConversionExtensions.cs @@ -226,7 +226,12 @@ namespace BizHawk.Client.Common.MovieConversionExtensions { foreach (var firmware in Global.FirmwareManager.RecentlyServed) { - movie.HeaderEntries.Add(firmware.SystemId + " Firmware " + firmware.FirmwareId, firmware.Hash); + var key = firmware.SystemId + " Firmware " + firmware.FirmwareId; + + if (!movie.HeaderEntries.ContainsKey(key)) + { + movie.HeaderEntries.Add(key, firmware.Hash); + } } }