move GetEmuVersion() to VersionInfo and refactor a whole bunch of stuff as a result
This commit is contained in:
parent
9e5e477467
commit
28a73c8174
|
@ -10,17 +10,17 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
#region Constructors
|
||||
|
||||
public Movie(string filename, string version)
|
||||
: this(version)
|
||||
public Movie(string filename)
|
||||
: this()
|
||||
{
|
||||
Rerecords = 0;
|
||||
Filename = filename;
|
||||
Loaded = filename.Length > 0;
|
||||
Loaded = !String.IsNullOrWhiteSpace(filename);
|
||||
}
|
||||
|
||||
public Movie(string version)
|
||||
public Movie()
|
||||
{
|
||||
Header = new MovieHeader(version);
|
||||
Header = new MovieHeader();
|
||||
Filename = String.Empty;
|
||||
_preload_framecount = 0;
|
||||
StartsFromSavestate = false;
|
||||
|
|
|
@ -53,10 +53,10 @@ namespace BizHawk.Client.Common
|
|||
return System.Guid.NewGuid().ToString();
|
||||
}
|
||||
|
||||
public MovieHeader(string version) //All required fields will be set to default values
|
||||
public MovieHeader() //All required fields will be set to default values
|
||||
{
|
||||
|
||||
HeaderParams.Add(EMULATIONVERSION, version);
|
||||
HeaderParams.Add(EMULATIONVERSION, VersionInfo.GetEmuVersion());
|
||||
HeaderParams.Add(MOVIEVERSION, MovieVersion);
|
||||
HeaderParams.Add(PLATFORM, "");
|
||||
HeaderParams.Add(GAMENAME, "");
|
||||
|
|
|
@ -32,55 +32,55 @@ namespace BizHawk.Client.Common
|
|||
public const string UNITCODE = "UnitCode";
|
||||
|
||||
// Attempt to import another type of movie file into a movie object.
|
||||
public static Movie ImportFile(string path, string bizVersion, out string errorMsg, out string warningMsg)
|
||||
public static Movie ImportFile(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
Movie m = new Movie(bizVersion);
|
||||
Movie m = new Movie();
|
||||
errorMsg = String.Empty;
|
||||
warningMsg = String.Empty;
|
||||
|
||||
string ext = path != null ? Path.GetExtension(path).ToUpper() : "";
|
||||
string ext = path != null ? Path.GetExtension(path).ToUpper() : String.Empty;
|
||||
try
|
||||
{
|
||||
switch (ext)
|
||||
{
|
||||
case ".FCM":
|
||||
m = ImportFCM(path, bizVersion, out errorMsg, out warningMsg);
|
||||
m = ImportFCM(path, out errorMsg, out warningMsg);
|
||||
break;
|
||||
case ".FM2":
|
||||
m = ImportFM2(path, bizVersion, out errorMsg, out warningMsg);
|
||||
m = ImportFM2(path, out errorMsg, out warningMsg);
|
||||
break;
|
||||
case ".FMV":
|
||||
m = ImportFMV(path, bizVersion, out errorMsg, out warningMsg);
|
||||
m = ImportFMV(path, out errorMsg, out warningMsg);
|
||||
break;
|
||||
case ".GMV":
|
||||
m = ImportGMV(path, bizVersion, out errorMsg, out warningMsg);
|
||||
m = ImportGMV(path, out errorMsg, out warningMsg);
|
||||
break;
|
||||
case ".LSMV":
|
||||
m = ImportLSMV(path, bizVersion, out errorMsg, out warningMsg);
|
||||
m = ImportLSMV(path, out errorMsg, out warningMsg);
|
||||
break;
|
||||
case ".MCM":
|
||||
m = ImportMCM(path, bizVersion, out errorMsg, out warningMsg);
|
||||
m = ImportMCM(path, out errorMsg, out warningMsg);
|
||||
break;
|
||||
case ".MC2":
|
||||
m = ImportMC2(path, bizVersion, out errorMsg, out warningMsg);
|
||||
m = ImportMC2(path, out errorMsg, out warningMsg);
|
||||
break;
|
||||
case ".MMV":
|
||||
m = ImportMMV(path, bizVersion, out errorMsg, out warningMsg);
|
||||
m = ImportMMV(path, out errorMsg, out warningMsg);
|
||||
break;
|
||||
case ".NMV":
|
||||
m = ImportNMV(path, bizVersion, out errorMsg, out warningMsg);
|
||||
m = ImportNMV(path, out errorMsg, out warningMsg);
|
||||
break;
|
||||
case ".SMV":
|
||||
m = ImportSMV(path, bizVersion, out errorMsg, out warningMsg);
|
||||
m = ImportSMV(path, out errorMsg, out warningMsg);
|
||||
break;
|
||||
case ".VBM":
|
||||
m = ImportVBM(path, bizVersion, out errorMsg, out warningMsg);
|
||||
m = ImportVBM(path, out errorMsg, out warningMsg);
|
||||
break;
|
||||
case ".VMV":
|
||||
m = ImportVMV(path, bizVersion, out errorMsg, out warningMsg);
|
||||
m = ImportVMV(path, out errorMsg, out warningMsg);
|
||||
break;
|
||||
case ".ZMV":
|
||||
m = ImportZMV(path, bizVersion, out errorMsg, out warningMsg);
|
||||
m = ImportZMV(path, out errorMsg, out warningMsg);
|
||||
break;
|
||||
}
|
||||
if (errorMsg == String.Empty)
|
||||
|
@ -285,15 +285,14 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// Import a text-based movie format. This works for .FM2 and .MC2.
|
||||
private static Movie ImportText(string path, string bizVersion, out string errorMsg, out string warningMsg)
|
||||
private static Movie ImportText(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = "";
|
||||
warningMsg = "";
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension, bizVersion);
|
||||
errorMsg = warningMsg = String.Empty;
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension);
|
||||
FileInfo file = new FileInfo(path);
|
||||
StreamReader sr = file.OpenText();
|
||||
string emulator = "";
|
||||
string platform = "";
|
||||
string emulator = String.Empty;
|
||||
string platform = String.Empty;
|
||||
switch (Path.GetExtension(path).ToUpper())
|
||||
{
|
||||
case ".FM2":
|
||||
|
@ -467,11 +466,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// FCM file format: http://code.google.com/p/fceu/wiki/FCM
|
||||
private static Movie ImportFCM(string path, string bizVersion, out string errorMsg, out string warningMsg)
|
||||
private static Movie ImportFCM(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = "";
|
||||
warningMsg = "";
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension, bizVersion);
|
||||
errorMsg = warningMsg = String.Empty;
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 4-byte signature: 46 43 4D 1A "FCM\x1A"
|
||||
|
@ -718,17 +716,16 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// FM2 file format: http://www.fceux.com/web/FM2.html
|
||||
private static Movie ImportFM2(string path, string bizVersion, out string errorMsg, out string warningMsg)
|
||||
private static Movie ImportFM2(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
return ImportText(path, bizVersion, out errorMsg, out warningMsg);
|
||||
return ImportText(path, out errorMsg, out warningMsg);
|
||||
}
|
||||
|
||||
// FMV file format: http://tasvideos.org/FMV.html
|
||||
private static Movie ImportFMV(string path, string bizVersion, out string errorMsg, out string warningMsg)
|
||||
private static Movie ImportFMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = "";
|
||||
warningMsg = "";
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension, bizVersion);
|
||||
errorMsg = warningMsg = String.Empty;
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 4-byte signature: 46 4D 56 1A "FMV\x1A"
|
||||
|
@ -867,11 +864,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// GMV file format: http://code.google.com/p/gens-rerecording/wiki/GMV
|
||||
private static Movie ImportGMV(string path, string bizVersion, out string errorMsg, out string warningMsg)
|
||||
private static Movie ImportGMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = "";
|
||||
warningMsg = "";
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension, bizVersion);
|
||||
errorMsg = warningMsg = String.Empty;
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 16-byte signature and format version: "Gens Movie TEST9"
|
||||
|
@ -993,11 +989,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// LSMV file format: http://tasvideos.org/Lsnes/Movieformat.html
|
||||
private static Movie ImportLSMV(string path, string bizVersion, out string errorMsg, out string warningMsg)
|
||||
private static Movie ImportLSMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = "";
|
||||
warningMsg = "";
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension, bizVersion);
|
||||
errorMsg = warningMsg = String.Empty;
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension);
|
||||
HawkFile hf = new HawkFile(path);
|
||||
// .LSMV movies are .zip files containing data files.
|
||||
if (!hf.IsArchive)
|
||||
|
@ -1226,11 +1221,10 @@ namespace BizHawk.Client.Common
|
|||
MCM file format: http://code.google.com/p/mednafen-rr/wiki/MCM
|
||||
Mednafen-rr switched to MC2 from r261, so see r260 for details.
|
||||
*/
|
||||
private static Movie ImportMCM(string path, string bizVersion, out string errorMsg, out string warningMsg)
|
||||
private static Movie ImportMCM(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = "";
|
||||
warningMsg = "";
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension, bizVersion);
|
||||
errorMsg = warningMsg = String.Empty;
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 8-byte "MDFNMOVI" signature
|
||||
|
@ -1344,17 +1338,16 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// MC2 file format: http://code.google.com/p/pcejin/wiki/MC2
|
||||
private static Movie ImportMC2(string path, string bizVersion, out string errorMsg, out string warningMsg)
|
||||
private static Movie ImportMC2(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
return ImportText(path, bizVersion, out errorMsg, out warningMsg);
|
||||
return ImportText(path, out errorMsg, out warningMsg);
|
||||
}
|
||||
|
||||
// MMV file format: http://tasvideos.org/MMV.html
|
||||
private static Movie ImportMMV(string path, string bizVersion, out string errorMsg, out string warningMsg)
|
||||
private static Movie ImportMMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = "";
|
||||
warningMsg = "";
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension, bizVersion);
|
||||
errorMsg = warningMsg = String.Empty;
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 0000: 4-byte signature: "MMV\0"
|
||||
|
@ -1467,11 +1460,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// NMV file format: http://tasvideos.org/NMV.html
|
||||
private static Movie ImportNMV(string path, string bizVersion, out string errorMsg, out string warningMsg)
|
||||
private static Movie ImportNMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = "";
|
||||
warningMsg = "";
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension, bizVersion);
|
||||
errorMsg = warningMsg = String.Empty;
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 4-byte signature: 4E 53 53 1A "NSS\x1A"
|
||||
|
@ -1697,11 +1689,10 @@ namespace BizHawk.Client.Common
|
|||
return m;
|
||||
}
|
||||
|
||||
private static Movie ImportSMV(string path, string bizVersion, out string errorMsg, out string warningMsg)
|
||||
private static Movie ImportSMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = "";
|
||||
warningMsg = "";
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension, bizVersion);
|
||||
errorMsg = warningMsg = String.Empty;
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 4-byte signature: 53 4D 56 1A "SMV\x1A"
|
||||
|
@ -1971,11 +1962,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// VBM file format: http://code.google.com/p/vba-rerecording/wiki/VBM
|
||||
private static Movie ImportVBM(string path, string bizVersion, out string errorMsg, out string warningMsg)
|
||||
private static Movie ImportVBM(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = "";
|
||||
warningMsg = "";
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension, bizVersion);
|
||||
errorMsg = warningMsg = String.Empty;
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 4-byte signature: 56 42 4D 1A "VBM\x1A"
|
||||
|
@ -2244,11 +2234,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// VMV file format: http://tasvideos.org/VMV.html
|
||||
private static Movie ImportVMV(string path, string bizVersion, out string errorMsg, out string warningMsg)
|
||||
private static Movie ImportVMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = "";
|
||||
warningMsg = "";
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension, bizVersion);
|
||||
errorMsg = warningMsg = String.Empty;
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 12-byte signature: "VirtuaNES MV"
|
||||
|
@ -2465,11 +2454,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// ZMV file format: http://tasvideos.org/ZMV.html
|
||||
private static Movie ImportZMV(string path, string bizVersion, out string errorMsg, out string warningMsg)
|
||||
private static Movie ImportZMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = "";
|
||||
warningMsg = "";
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension, bizVersion);
|
||||
errorMsg = warningMsg = String.Empty;
|
||||
Movie m = new Movie(path + "." + Global.Config.MovieExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 3-byte signature: 5A 4D 56 "ZMV"
|
||||
|
|
|
@ -2171,7 +2171,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
else if (IsValidMovieExtension(ext))
|
||||
{
|
||||
StartNewMovie(new Movie(filePaths[0], GlobalWin.MainForm.GetEmuVersion()), false);
|
||||
StartNewMovie(new Movie(filePaths[0]), false);
|
||||
}
|
||||
else if (ext.ToUpper() == ".STATE")
|
||||
{
|
||||
|
@ -2202,7 +2202,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
string errorMsg;
|
||||
string warningMsg;
|
||||
Movie movie = MovieImport.ImportFile(filePaths[0], GlobalWin.MainForm.GetEmuVersion(), out errorMsg, out warningMsg);
|
||||
Movie movie = MovieImport.ImportFile(filePaths[0], out errorMsg, out warningMsg);
|
||||
if (errorMsg.Length > 0)
|
||||
{
|
||||
MessageBox.Show(errorMsg, "Conversion error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
Global.FirmwareManager = new FirmwareManager();
|
||||
Global.MovieSession = new MovieSession
|
||||
{
|
||||
Movie = new Movie(GlobalWin.MainForm.GetEmuVersion()),
|
||||
Movie = new Movie(),
|
||||
MessageCallback = GlobalWin.OSD.AddMessage,
|
||||
AskYesNoCallback = StateErrorAskUser
|
||||
};
|
||||
|
@ -198,14 +198,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
else
|
||||
{
|
||||
Movie m = new Movie(cmdMovie, GlobalWin.MainForm.GetEmuVersion());
|
||||
Movie movie = new Movie(cmdMovie);
|
||||
Global.ReadOnly = true;
|
||||
// if user is dumping and didnt supply dump length, make it as long as the loaded movie
|
||||
if (autoDumpLength == 0)
|
||||
{
|
||||
autoDumpLength = m.RawFrames;
|
||||
autoDumpLength = movie.RawFrames;
|
||||
}
|
||||
StartNewMovie(m, false);
|
||||
StartNewMovie(movie, false);
|
||||
Global.Config.RecentMovies.Add(cmdMovie);
|
||||
}
|
||||
}
|
||||
|
@ -217,8 +217,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
else
|
||||
{
|
||||
Movie m = new Movie(Global.Config.RecentMovies[0], GlobalWin.MainForm.GetEmuVersion());
|
||||
StartNewMovie(m, false);
|
||||
StartNewMovie(new Movie(Global.Config.RecentMovies[0]), false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1625,16 +1624,16 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void LoadMoviesFromRecent(string path)
|
||||
{
|
||||
Movie m = new Movie(path, GetEmuVersion());
|
||||
Movie movie = new Movie(path);
|
||||
|
||||
if (!m.Loaded)
|
||||
if (!movie.Loaded)
|
||||
{
|
||||
ToolHelpers.HandleLoadError(Global.Config.RecentMovies, path);
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.ReadOnly = true;
|
||||
StartNewMovie(m, false);
|
||||
StartNewMovie(movie, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2967,11 +2966,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
#region Scheduled for refactor
|
||||
|
||||
public string GetEmuVersion() //This doesn't need to be on mainform
|
||||
{
|
||||
return VersionInfo.INTERIM ? "SVN " + SubWCRev.SVN_REV : ("Version " + VersionInfo.MAINVERSION);
|
||||
}
|
||||
|
||||
private void NESSpeicalMenuAdd(string name, string button, string msg) //TODO: don't do this, put these into the menu but hide them in the dropdownopened event as needed
|
||||
{
|
||||
NESSpecialControlsMenuItem.Visible = true;
|
||||
|
@ -3775,7 +3769,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
string d = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPath, null);
|
||||
string errorMsg;
|
||||
string warningMsg;
|
||||
Movie m = MovieImport.ImportFile(fn, GlobalWin.MainForm.GetEmuVersion(), out errorMsg, out warningMsg);
|
||||
Movie m = MovieImport.ImportFile(fn, out errorMsg, out warningMsg);
|
||||
if (errorMsg.Length > 0)
|
||||
MessageBox.Show(errorMsg, "Conversion error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
if (warningMsg.Length > 0)
|
||||
|
|
|
@ -97,9 +97,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (file.Extension.ToUpper() == "STATE")
|
||||
{
|
||||
Movie m = new Movie(file.FullName, GlobalWin.MainForm.GetEmuVersion());
|
||||
m.LoadMovie(); //State files will have to load everything unfortunately
|
||||
if (m.Frames == 0)
|
||||
Movie movie = new Movie(file.FullName);
|
||||
movie.LoadMovie(); //State files will have to load everything unfortunately
|
||||
if (movie.Frames == 0)
|
||||
{
|
||||
MessageBox.Show("No input log detected in this savestate, aborting", "Can not load file", MessageBoxButtons.OK, MessageBoxIcon.Hand);
|
||||
return;
|
||||
|
@ -126,13 +126,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
int x = IsDuplicate(filename);
|
||||
if (x == 0)
|
||||
{
|
||||
Movie m = new Movie(file.CanonicalFullPath, GlobalWin.MainForm.GetEmuVersion());
|
||||
m.LoadMovie(); //State files will have to load everything unfortunately
|
||||
if (m.Frames > 0)
|
||||
Movie movie = new Movie(file.CanonicalFullPath);
|
||||
movie.LoadMovie(); //State files will have to load everything unfortunately
|
||||
if (movie.Frames > 0)
|
||||
{
|
||||
MovieList.Add(m);
|
||||
MovieList.Add(movie);
|
||||
sortReverse = false;
|
||||
sortedCol = "";
|
||||
sortedCol = String.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -178,21 +178,21 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void PreLoadMovieFile(HawkFile path, bool force)
|
||||
{
|
||||
Movie m = new Movie(path.CanonicalFullPath, GlobalWin.MainForm.GetEmuVersion());
|
||||
m.PreLoadText();
|
||||
Movie movie = new Movie(path.CanonicalFullPath);
|
||||
movie.PreLoadText();
|
||||
if (path.Extension == ".FM2")
|
||||
{
|
||||
m.Header.SetHeaderLine(MovieHeader.PLATFORM, "NES");
|
||||
movie.Header.SetHeaderLine(MovieHeader.PLATFORM, "NES");
|
||||
}
|
||||
else if (path.Extension == ".MC2")
|
||||
{
|
||||
m.Header.SetHeaderLine(MovieHeader.PLATFORM, "PCE");
|
||||
movie.Header.SetHeaderLine(MovieHeader.PLATFORM, "PCE");
|
||||
}
|
||||
//Don't do this from browse
|
||||
if (m.Header.GetHeaderLine(MovieHeader.GAMENAME) == Global.Game.Name ||
|
||||
if (movie.Header.GetHeaderLine(MovieHeader.GAMENAME) == Global.Game.Name ||
|
||||
Global.Config.PlayMovie_MatchGameName == false || force)
|
||||
{
|
||||
MovieList.Add(m);
|
||||
MovieList.Add(movie);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -391,7 +391,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
break;
|
||||
case MovieHeader.EMULATIONVERSION:
|
||||
if (kvp.Value != GlobalWin.MainForm.GetEmuVersion())
|
||||
if (kvp.Value != VersionInfo.GetEmuVersion())
|
||||
{
|
||||
item.BackColor = Color.Yellow;
|
||||
}
|
||||
|
|
|
@ -59,11 +59,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
|
||||
MovieToRecord = new Movie(path, GlobalWin.MainForm.GetEmuVersion());
|
||||
MovieToRecord = new Movie(path);
|
||||
|
||||
//Header
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.AUTHOR, AuthorBox.Text);
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.EMULATIONVERSION, GlobalWin.MainForm.GetEmuVersion());
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.EMULATIONVERSION, VersionInfo.GetEmuVersion());
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.MOVIEVERSION, MovieHeader.MovieVersion);
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.GUID, MovieHeader.MakeGUID());
|
||||
MovieToRecord.Header.SetHeaderLine(MovieHeader.PLATFORM, Global.Game.System);
|
||||
|
|
|
@ -21,9 +21,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
string path = PathManager.SaveStatePrefix(Global.Game) + "." + name + ".State";
|
||||
if (File.Exists(path))
|
||||
{
|
||||
Movie m = new Movie(GlobalWin.MainForm.GetEmuVersion());
|
||||
LoadLogFromSavestateText(m, path);
|
||||
AddLog(m.LogDump, i);
|
||||
Movie movie = new Movie();
|
||||
LoadLogFromSavestateText(movie, path);
|
||||
AddLog(movie.LogDump, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,4 +3,9 @@ static class VersionInfo
|
|||
public const string MAINVERSION = "1.5.2";
|
||||
public const string RELEASEDATE = "August 22, 2013";
|
||||
public static bool INTERIM = true;
|
||||
|
||||
public static string GetEmuVersion() //This doesn't need to be on mainform
|
||||
{
|
||||
return INTERIM ? "SVN " + SubWCRev.SVN_REV : ("Version " + MAINVERSION);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue