More movies 2.0 stuff

This commit is contained in:
adelikat 2014-06-12 21:45:47 +00:00
parent 05b3f369eb
commit 3ea79c720b
6 changed files with 18 additions and 22 deletions

View File

@ -4,9 +4,6 @@ namespace BizHawk.Client.Common
{
public static class HeaderKeys
{
public const string MovieVersion1 = "BizHawk v0.0.1";
public const string MovieVersion2 = "BizHawk v0.0.2";
public const string EMULATIONVERSION = "emuVersion";
public const string MOVIEVERSION = "MovieVersion";
public const string PLATFORM = "Platform";

View File

@ -119,10 +119,6 @@ namespace BizHawk.Client.Common
m = ImportZMV(path, out errorMsg, out warningMsg);
break;
}
if (errorMsg == string.Empty)
{
m.Header[HeaderKeys.MOVIEVERSION] = HeaderKeys.MovieVersion1;
}
}
catch (Exception except)
{

View File

@ -39,5 +39,17 @@ namespace BizHawk.Client.Common
yield return "tasproj";
}
}
/// <summary>
/// Creates a default instance of the default implementation,
/// no path is specified so this is in a minimal state that would not be able to be saved
/// </summary>
public static IMovie DefaultInstance
{
get
{
return new Movie();
}
}
}
}

View File

@ -11,7 +11,6 @@ namespace BizHawk.Client.Common
Subtitles = new SubtitleList();
this[HeaderKeys.EMULATIONVERSION] = VersionInfo.GetEmuVersion();
this[HeaderKeys.MOVIEVERSION] = HeaderKeys.MovieVersion1;
this[HeaderKeys.PLATFORM] = Global.Emulator != null ? Global.Emulator.SystemId : string.Empty;
this[HeaderKeys.GAMENAME] = string.Empty;
this[HeaderKeys.AUTHOR] = string.Empty;

View File

@ -78,7 +78,7 @@ namespace BizHawk.Client.EmuHawk
Global.FirmwareManager = new FirmwareManager();
Global.MovieSession = new MovieSession
{
Movie = new Movie(),
Movie = MovieService.DefaultInstance,
MessageCallback = GlobalWin.OSD.AddMessage,
AskYesNoCallback = StateErrorAskUser
};
@ -1439,17 +1439,15 @@ namespace BizHawk.Client.EmuHawk
private void LoadMoviesFromRecent(string path)
{
var movie = MovieService.Get(path);
// Movies 2.0 TODO
if (!(movie as Movie).Loaded)
if (File.Exists(path))
{
ToolHelpers.HandleLoadError(Global.Config.RecentMovies, path);
var movie = MovieService.Get(path);
Global.MovieSession.ReadOnly = true;
StartNewMovie(movie, false);
}
else
{
Global.MovieSession.ReadOnly = true;
StartNewMovie(movie, false);
ToolHelpers.HandleLoadError(Global.Config.RecentMovies, path);
}
}

View File

@ -462,12 +462,6 @@ namespace BizHawk.Client.EmuHawk
toolTip1.SetToolTip(DetailsView, "Current SHA1: " + Global.Game.Hash);
}
break;
case HeaderKeys.MOVIEVERSION:
if (kvp.Value != HeaderKeys.MovieVersion1)
{
item.BackColor = Color.Yellow;
}
break;
case HeaderKeys.EMULATIONVERSION:
if (kvp.Value != VersionInfo.GetEmuVersion())
{