Change default movie extension to .bkm

This commit is contained in:
adelikat 2012-03-31 00:38:39 +00:00
parent 2eba9e0c71
commit ab2e804300
6 changed files with 24 additions and 25 deletions

View File

@ -153,6 +153,7 @@ namespace BizHawk.MultiClient
public bool AutoLoadLastSaveSlot = false;
public bool WIN32_CONSOLE = true;
public bool SkipLagFrame = false;
public string MovieExtension = "bkm";
// Run-Control settings
public int FrameProgressDelayMs = 500; //how long until a frame advance hold turns into a frame progress?

View File

@ -885,7 +885,7 @@ namespace BizHawk.MultiClient
case "GB": str += "gb"; break;
}
return str + ".tas";
return str + "." + Global.Config.MovieExtension;
}
private void HandlePlatformMenus()
@ -2732,7 +2732,7 @@ namespace BizHawk.MultiClient
if (warningMsg.Length > 0)
Global.RenderPanel.AddMessage(warningMsg);
else
Global.RenderPanel.AddMessage(Path.GetFileName(fn) + " imported as .tas");
Global.RenderPanel.AddMessage(Path.GetFileName(fn) + " imported as ." + Global.Config.MovieExtension);
}
}

View File

@ -72,8 +72,7 @@ namespace BizHawk.MultiClient
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.MoviesPath, "");
ofd.Filter = "Generic Movie Files (*.tas)|*.tas;*.zip;*.7z|" + Global.MainForm.GetMovieExtName() + "|Savestates|*.state|Archive Files|*.zip;*.7z|All Files|*.*";
//ofd.Filter = "Generic Movie Files (*.tas)|*.tas;*.zip;*.7z|Savestates|*.state|Archive Files|*.zip;*.7z|All Files|*.*";
ofd.Filter = "Generic Movie Files (*." + Global.Config.MovieExtension + ")|*." + Global.Config.MovieExtension + ";*.zip;*.7z|" + Global.MainForm.GetMovieExtName() + "|Savestates|*.state|Archive Files|*.zip;*.7z|All Files|*.*";
Global.Sound.StopSound();
var result = ofd.ShowDialog();
@ -269,7 +268,7 @@ namespace BizHawk.MultiClient
if (!Directory.Exists(d))
Directory.CreateDirectory(d);
foreach (string f in Directory.GetFiles(d, "*.tas"))
foreach (string f in Directory.GetFiles(d, "*." + Global.Config.MovieExtension))
AddMovieToList(f);
if (Global.Config.PlayMovie_ShowStateFiles)
{
@ -282,7 +281,7 @@ namespace BizHawk.MultiClient
string[] subs = Directory.GetDirectories(d);
foreach (string dir in subs)
{
foreach (string f in Directory.GetFiles(dir, "*.tas"))
foreach (string f in Directory.GetFiles(dir, "*." + Global.Config.MovieExtension))
AddMovieToList(f);
if (Global.Config.PlayMovie_ShowStateFiles)
{
@ -370,7 +369,7 @@ namespace BizHawk.MultiClient
string[] filePaths = (string[])e.Data.GetData(DataFormats.FileDrop);
foreach (string path in filePaths)
{
if (Path.GetExtension(path) == ".tas")
if (Path.GetExtension(path) == "." + Global.Config.MovieExtension)
AddMovieToList(path);
}
}

View File

@ -36,8 +36,8 @@ namespace BizHawk.MultiClient
path = path.Insert(0, "\\");
path = PathManager.MakeAbsolutePath(Global.Config.MoviesPath, "") + path;
if (path[path.Length - 4] != '.') //If no file extension, add .tas
path += ".tas";
if (path[path.Length - 4] != '.') //If no file extension, add movie extension
path += "." + Global.Config.MovieExtension;
return path;
}
else
@ -118,10 +118,9 @@ namespace BizHawk.MultiClient
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.MoviesPath, "");
sfd.DefaultExt = ".tas";
sfd.DefaultExt = "." + Global.Config.MovieExtension;
sfd.FileName = PathManager.FilesystemSafeName(Global.Game) + "." + sfd.DefaultExt;
sfd.Filter = "Generic Movie Files (*.tas)|*.tas|" + Global.MainForm.GetMovieExtName() + "|All Files (*.*)|*.*";
//sfd.Filter = "Generic Movie Files (*.tas)|*.tas|All Files (*.*)|*.*";
sfd.Filter = "Generic Movie Files (*." + Global.Config.MovieExtension + ")|*." + Global.Config.MovieExtension + "|" + Global.MainForm.GetMovieExtName() + "|All Files (*.*)|*.*";
Global.Sound.StopSound();
var result = sfd.ShowDialog();

View File

@ -90,7 +90,7 @@ namespace BizHawk.MultiClient
{
errorMsg = "";
warningMsg = "";
Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY);
Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY);
FileInfo file = new FileInfo(path);
StreamReader sr = file.OpenText();
string[] buttons = new string[] { };
@ -307,7 +307,7 @@ namespace BizHawk.MultiClient
{
errorMsg = "";
warningMsg = "";
Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY);
Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
// 000 4-byte signature: 46 43 4D 1A "FCM\x1A"
@ -562,7 +562,7 @@ namespace BizHawk.MultiClient
{
errorMsg = "";
warningMsg = "";
Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY);
Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
// 000 4-byte signature: 46 4D 56 1A "FMV\x1A"
@ -692,7 +692,7 @@ namespace BizHawk.MultiClient
{
errorMsg = "";
warningMsg = "";
Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY);
Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
// 000 16-byte signature and format version: "Gens Movie TEST9"
@ -806,7 +806,7 @@ namespace BizHawk.MultiClient
{
errorMsg = "";
warningMsg = "";
Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY);
Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
// 000 8-byte "MDFNMOVI" signature
@ -929,7 +929,7 @@ namespace BizHawk.MultiClient
{
errorMsg = "";
warningMsg = "";
Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY);
Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
// 0000: 4-byte signature: "MMV\0"
@ -1044,7 +1044,7 @@ namespace BizHawk.MultiClient
{
errorMsg = "";
warningMsg = "";
Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY);
Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
// 000 4-byte signature: 4E 53 53 1A "NSS\x1A"
@ -1293,7 +1293,7 @@ namespace BizHawk.MultiClient
// SMV 1.43 file format: http://code.google.com/p/snes9x-rr/wiki/SMV143
private static Movie ImportSMV143(BinaryReader r, string path)
{
Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY);
Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY);
uint GUID = r.ReadUInt32();
m.Header.SetHeaderLine(MovieHeader.GUID, GUID.ToString()); //TODO: format to hex string
m.SetRerecords((int)r.ReadUInt32());
@ -1348,7 +1348,7 @@ namespace BizHawk.MultiClient
// SMV 1.51 file format: http://code.google.com/p/snes9x-rr/wiki/SMV151
private static Movie ImportSMV151(BinaryReader r, string path)
{
Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY);
Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY);
m.Header.Comments.Add(EMULATIONORIGIN + " Snes9x version 1.51");
m.Header.Comments.Add(MOVIEORIGIN + " .SMV");
return m;
@ -1356,7 +1356,7 @@ namespace BizHawk.MultiClient
private static Movie ImportSMV152(BinaryReader r, string path)
{
Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY);
Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY);
uint GUID = r.ReadUInt32();
m.Header.Comments.Add(EMULATIONORIGIN + " Snes9x version 1.52");
m.Header.Comments.Add(MOVIEORIGIN + " .SMV");
@ -1368,7 +1368,7 @@ namespace BizHawk.MultiClient
{
errorMsg = "";
warningMsg = "";
Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY);
Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
// 000 4-byte signature: 56 42 4D 1A "VBM\x1A"
@ -1594,7 +1594,7 @@ namespace BizHawk.MultiClient
{
errorMsg = "";
warningMsg = "";
Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY);
Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
// 000 12-byte signature: "VirtuaNES MV"

View File

@ -32,7 +32,7 @@ namespace BizHawk.MultiClient
//Movie header object - to have the main project header data
//List<string> MacroFiles - list of .macro files (simply log files)
//List<string> TimeLines - list of .tas files
//List<string> TimeLines - list of movie files
//List<string> Bookmarks - list of savestate files
public TAStudio()