More movie 2.0 stuff
This commit is contained in:
parent
6bd2df3bbf
commit
e0a9fcd650
|
@ -148,7 +148,7 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public string PreferredExtension { get { return "bkm"; } }
|
||||
|
||||
// TODO: delete me
|
||||
// Movies 2.0 TODO: delete me
|
||||
public static string Extension { get { return "bkm"; } }
|
||||
|
||||
public MovieHeader Header { get; private set; }
|
||||
|
|
|
@ -1794,6 +1794,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
SaveMovieContextMenuItem.Visible =
|
||||
Global.MovieSession.Movie.IsActive;
|
||||
|
||||
// Movies 2.0 TODO
|
||||
BackupMovieContextMenuItem.Visible = Global.MovieSession.Movie is Movie && Global.MovieSession.Movie.IsActive;
|
||||
|
||||
StopNoSaveContextMenuItem.Visible = Global.MovieSession.Movie.IsActive && Global.MovieSession.Movie.Changes;
|
||||
|
@ -1903,6 +1904,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void BackupMovieContextMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
//Movies 2.0 TODO
|
||||
if (Global.MovieSession.Movie is Movie)
|
||||
{
|
||||
GlobalWin.OSD.AddMessage("Backup movie saved.");
|
||||
|
@ -2190,7 +2192,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
else if (MovieSession.IsValidMovieExtension(ext))
|
||||
{
|
||||
StartNewMovie(new Movie(filePaths[0]), false);
|
||||
StartNewMovie(MovieLoader.Load(filePaths[0]), false);
|
||||
}
|
||||
else if (ext.ToUpper() == ".STATE")
|
||||
{
|
||||
|
@ -2236,9 +2238,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
else
|
||||
{
|
||||
//fix movie extension to something palatable for these purposes.
|
||||
//for instance, something which doesnt clobber movies you already may have had.
|
||||
//i'm evenly torn between this, and a file in %TEMP%, but since we dont really have a way to clean up this tempfile, i choose this:
|
||||
// fix movie extension to something palatable for these purposes.
|
||||
// for instance, something which doesnt clobber movies you already may have had.
|
||||
// i'm evenly torn between this, and a file in %TEMP%, but since we dont really have a way to clean up this tempfile, i choose this:
|
||||
movie.Filename += ".autoimported." + Movie.Extension;
|
||||
movie.Save();
|
||||
StartNewMovie(movie, false);
|
||||
|
|
|
@ -265,7 +265,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
else
|
||||
{
|
||||
var movie = new Movie(cmdMovie);
|
||||
var movie = MovieLoader.Load(cmdMovie);
|
||||
Global.MovieSession.ReadOnly = true;
|
||||
|
||||
// if user is dumping and didnt supply dump length, make it as long as the loaded movie
|
||||
|
@ -286,7 +286,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
else
|
||||
{
|
||||
StartNewMovie(new Movie(Global.Config.RecentMovies.MostRecent), false);
|
||||
StartNewMovie(MovieLoader.Load(Global.Config.RecentMovies.MostRecent), false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1439,10 +1439,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void LoadMoviesFromRecent(string path)
|
||||
{
|
||||
// Movies 2.0 TODO - Use MovieLoader that returns an IMovie, loader will have a success flag to pass to HandleLoadError()
|
||||
var movie = new Movie(path);
|
||||
var movie = MovieLoader.Load(path);
|
||||
|
||||
if (!movie.Loaded)
|
||||
// Movies 2.0 TODO
|
||||
if (!(movie as Movie).Loaded)
|
||||
{
|
||||
ToolHelpers.HandleLoadError(Global.Config.RecentMovies, path);
|
||||
}
|
||||
|
|
|
@ -188,6 +188,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
var tas = new List<int>();
|
||||
for (var i = 0; i < indices.Count; i++)
|
||||
{
|
||||
// Movies 2.0 TODO: MovieLoader could have a list of valid extensiosn to match
|
||||
if (Path.GetExtension(_movieList[indices[i]].Filename).ToUpper() == "." + Movie.Extension)
|
||||
{
|
||||
tas.Add(i);
|
||||
|
@ -295,6 +296,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
var filePaths = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
|
||||
// Movies 2.0 TODO: MovieLoader could have a list of valid extensiosn to match
|
||||
filePaths
|
||||
.Where(path => Path.GetExtension(path) == "." + Movie.Extension)
|
||||
.ToList()
|
||||
|
@ -605,6 +607,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
var ofd = new OpenFileDialog
|
||||
{
|
||||
// Movies 2.0 TODO
|
||||
Filter = "Movie Files (*." + Movie.Extension + ")|*." + Movie.Extension + "|Savestates|*.state|All Files|*.*",
|
||||
InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPathFragment, null)
|
||||
};
|
||||
|
|
|
@ -73,6 +73,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
// Movies 2.0 TODO
|
||||
Movie _movieToRecord;
|
||||
|
||||
if (StartFromCombo.SelectedItem.ToString() == "Now")
|
||||
|
|
|
@ -44,7 +44,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
GlobalWin.OSD.AddMessage("TAStudio Disengaged");
|
||||
if (Global.MovieSession.Movie is TasMovie)
|
||||
{
|
||||
Global.MovieSession.Movie = new Movie();
|
||||
GlobalWin.MainForm.StopMovie(saveChanges: false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue