don't double load movie files when pre-loading, remove unused HawkFile parameter
This commit is contained in:
parent
624493e6e2
commit
72993a3bd0
|
@ -48,17 +48,7 @@ namespace BizHawk.Client.Common
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool PreLoadHeaderAndLength(HawkFile hawkFile)
|
public bool PreLoadHeaderAndLength() => Load(true);
|
||||||
{
|
|
||||||
var file = new FileInfo(Filename);
|
|
||||||
if (!file.Exists)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Filename = file.FullName;
|
|
||||||
return Load(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual void Write(string fn, bool isBackup = false)
|
protected virtual void Write(string fn, bool isBackup = false)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
using BizHawk.Common;
|
|
||||||
using BizHawk.Emulation.Common;
|
using BizHawk.Emulation.Common;
|
||||||
|
|
||||||
namespace BizHawk.Client.Common
|
namespace BizHawk.Client.Common
|
||||||
|
@ -98,7 +96,7 @@ namespace BizHawk.Client.Common
|
||||||
/// Loads from the HawkFile the minimal amount of information needed to determine Header info and Movie length
|
/// Loads from the HawkFile the minimal amount of information needed to determine Header info and Movie length
|
||||||
/// This method is intended to be more performant than a full load
|
/// This method is intended to be more performant than a full load
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool PreLoadHeaderAndLength(HawkFile hawkFile);
|
bool PreLoadHeaderAndLength();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the header key value pairs stored in the movie file
|
/// Gets the header key value pairs stored in the movie file
|
||||||
|
|
|
@ -136,7 +136,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
movie.PreLoadHeaderAndLength(hf);
|
movie.PreLoadHeaderAndLength();
|
||||||
|
|
||||||
// Don't do this from browse
|
// Don't do this from browse
|
||||||
if (movie.Hash == _game.Hash
|
if (movie.Hash == _game.Hash
|
||||||
|
|
Loading…
Reference in New Issue