MovieSession - simplify gambatte name getting

This commit is contained in:
adelikat 2020-04-19 14:51:45 -05:00
parent 72c4e19183
commit ba17c1fe2b
1 changed files with 2 additions and 2 deletions

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using BizHawk.Client.Common.MovieConversionExtensions; using BizHawk.Client.Common.MovieConversionExtensions;
using BizHawk.Emulation.Common; using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores;
using BizHawk.Emulation.Cores.Nintendo.Gameboy; using BizHawk.Emulation.Cores.Nintendo.Gameboy;
namespace BizHawk.Client.Common namespace BizHawk.Client.Common
@ -437,8 +438,7 @@ namespace BizHawk.Client.Common
private void HandlePlaybackEnd() private void HandlePlaybackEnd()
{ {
var gambatteName = ((CoreAttribute)Attribute.GetCustomAttribute(typeof(Gameboy), typeof(CoreAttribute))).CoreName; if (Movie.Core == CoreNames.Gambatte)
if (Movie.Core == gambatteName)
{ {
var movieCycles = Convert.ToUInt64(Movie.HeaderEntries[HeaderKeys.CycleCount]); var movieCycles = Convert.ToUInt64(Movie.HeaderEntries[HeaderKeys.CycleCount]);
var coreCycles = ((Gameboy)_emulator).CycleCount; var coreCycles = ((Gameboy)_emulator).CycleCount;