-Added the SNES formats to the Import dialog.
-Figured out how to get files from the .LSMV archive. Will write the input parser shortly.
This commit is contained in:
parent
9e1ecd02d2
commit
8a24de458f
|
@ -3092,16 +3092,19 @@ namespace BizHawk.MultiClient
|
||||||
ofd.InitialDirectory = PathManager.GetRomsPath(Global.Emulator.SystemId);
|
ofd.InitialDirectory = PathManager.GetRomsPath(Global.Emulator.SystemId);
|
||||||
ofd.Multiselect = true;
|
ofd.Multiselect = true;
|
||||||
ofd.Filter = FormatFilter(
|
ofd.Filter = FormatFilter(
|
||||||
"Movie Files", "*.fm2;*.mc2;*.mcm;*.mmv;*.fcm;*.fmv;*.vmv;*.nmv;*.gmv;*.vbm;",
|
"Movie Files", "*.fm2;*.mc2;*.mcm;*.mmv;*.gmv;*.vbm;*.lsmv;*.fcm;*.fmv;*.vmv;*.nmv;*.smv;*.zmv;",
|
||||||
"FCEUX", "*.fm2",
|
"FCEUX", "*.fm2",
|
||||||
"PCEjin/Mednafen", "*.mc2;*.mcm",
|
"PCEjin/Mednafen", "*.mc2;*.mcm",
|
||||||
"Dega", "*.mmv",
|
"Dega", "*.mmv",
|
||||||
|
"Gens", "*.gmv",
|
||||||
|
"Visual Boy Advance", "*.vbm",
|
||||||
|
"LSNES", "*.lsmv",
|
||||||
"FCEU", "*.fcm",
|
"FCEU", "*.fcm",
|
||||||
"Famtasia", "*.fmv",
|
"Famtasia", "*.fmv",
|
||||||
"VirtuaNES", "*.vmv",
|
"VirtuaNES", "*.vmv",
|
||||||
"Nintendulator", "*.nmv",
|
"Nintendulator", "*.nmv",
|
||||||
"Gens", "*.gmv",
|
"Snes9x", "*.smv",
|
||||||
"Visual Boy Advance", "*.vbm",
|
"ZSNES", "*.zmv",
|
||||||
"All Files", "*.*");
|
"All Files", "*.*");
|
||||||
|
|
||||||
ofd.RestoreDirectory = false;
|
ofd.RestoreDirectory = false;
|
||||||
|
|
|
@ -82,8 +82,8 @@ namespace BizHawk.MultiClient
|
||||||
// Return whether or not the type of file provided can currently be imported.
|
// Return whether or not the type of file provided can currently be imported.
|
||||||
public static bool IsValidMovieExtension(string extension)
|
public static bool IsValidMovieExtension(string extension)
|
||||||
{
|
{
|
||||||
string[] extensions = new string[11] {
|
string[] extensions = new string[13] {
|
||||||
"FCM", "FM2", "FMV", "GMV", "MCM", "MC2", "MMV", "NMV", "SMV", "VBM", "VMV"
|
"FCM", "FM2", "FMV", "GMV", "MCM", "MC2", "MMV", "NMV", "LSMV", "SMV", "VBM", "VMV", "ZMV"
|
||||||
};
|
};
|
||||||
foreach (string ext in extensions)
|
foreach (string ext in extensions)
|
||||||
if (extension.ToUpper() == "." + ext)
|
if (extension.ToUpper() == "." + ext)
|
||||||
|
@ -849,7 +849,22 @@ namespace BizHawk.MultiClient
|
||||||
errorMsg = "";
|
errorMsg = "";
|
||||||
warningMsg = "";
|
warningMsg = "";
|
||||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension);
|
Movie m = new Movie(path + "." + Global.Config.MovieExtension);
|
||||||
// TODO: Import.
|
HawkFile hf = new HawkFile(path);
|
||||||
|
// .LSMV movies are .zip files containing data files.
|
||||||
|
if (!hf.IsArchive)
|
||||||
|
{
|
||||||
|
errorMsg = "This is not an archive.";
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
foreach (var item in hf.ArchiveItems)
|
||||||
|
{
|
||||||
|
if (item.name == "input")
|
||||||
|
{
|
||||||
|
hf.BindArchiveMember(item.index);
|
||||||
|
var stream = hf.GetStream();
|
||||||
|
string input = Encoding.UTF8.GetString(Util.ReadAllBytes(stream));
|
||||||
|
}
|
||||||
|
}
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue