remove .bkm as a standard movie type, require user to run the importer
This commit is contained in:
parent
8dfbd752ae
commit
adf834480a
|
@ -2,8 +2,6 @@
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
using BizHawk.Client.Common.MovieConversionExtensions;
|
||||
|
||||
namespace BizHawk.Client.Common
|
||||
{
|
||||
public static class MovieService
|
||||
|
@ -11,26 +9,11 @@ namespace BizHawk.Client.Common
|
|||
public static IMovie Get(string path)
|
||||
{
|
||||
// TODO: change IMovies to take HawkFiles only and not path
|
||||
if (Path.GetExtension(path).EndsWith("tasproj"))
|
||||
if (Path.GetExtension(path)?.EndsWith("tasproj") ?? false)
|
||||
{
|
||||
return new TasMovie(path);
|
||||
}
|
||||
|
||||
if (Path.GetExtension(path).EndsWith("bkm"))
|
||||
{
|
||||
var bkm = new BkmMovie(path);
|
||||
bkm.Load(false);
|
||||
|
||||
// Hackery to fix how things used to work
|
||||
if (bkm.SystemID == "GBC")
|
||||
{
|
||||
bkm.SystemID = "GB";
|
||||
}
|
||||
|
||||
return bkm.ToBk2();
|
||||
}
|
||||
|
||||
// Default to bk2
|
||||
return new Bk2Movie(path);
|
||||
}
|
||||
|
||||
|
@ -42,15 +25,7 @@ namespace BizHawk.Client.Common
|
|||
/// <summary>
|
||||
/// Gets a list of extensions for all <seealso cref="IMovie"/> implementations
|
||||
/// </summary>
|
||||
public static IEnumerable<string> MovieExtensions
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return "bkm";
|
||||
yield return "bk2";
|
||||
yield return "tasproj";
|
||||
}
|
||||
}
|
||||
public static IEnumerable<string> MovieExtensions => new[] { "bk2", "tasproj" };
|
||||
|
||||
public static bool IsValidMovieExtension(string ext)
|
||||
{
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
LoadFile(new FileInfo(ofd.FileName));
|
||||
}
|
||||
else if (ofd.FileName.EndsWith(".bkm") || ofd.FileName.EndsWith(".bk2")) // todo: proper extention iteration
|
||||
else if (ofd.FileName.EndsWith(Bk2Movie.Extension))
|
||||
{
|
||||
var result1 = MessageBox.Show("This is a regular movie, a new project must be created from it, in order to use in TAStudio\nProceed?", "Convert movie", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
|
||||
if (result1 == DialogResult.OK)
|
||||
|
|
Loading…
Reference in New Issue