Move a function from mainform to moviesession

This commit is contained in:
adelikat 2013-12-27 14:39:01 +00:00
parent a005767463
commit 2d51ac5d13
3 changed files with 15 additions and 15 deletions

View File

@ -31,6 +31,20 @@ namespace BizHawk.Client.Common
} }
} }
public static bool IsValidMovieExtension(string ext)
{
if (ext.ToUpper() == "." + Global.Config.MovieExtension)
{
return true;
}
else if (ext.ToUpper() == ".TAS" || ext.ToUpper() == ".BKM")
{
return true;
}
return false;
}
public void LatchMultitrackPlayerInput(IController playerSource, MultitrackRewiringControllerAdapter rewiredSource) public void LatchMultitrackPlayerInput(IController playerSource, MultitrackRewiringControllerAdapter rewiredSource)
{ {
if (_multiTrack.IsActive) if (_multiTrack.IsActive)

View File

@ -2081,7 +2081,7 @@ namespace BizHawk.Client.EmuHawk
GlobalWin.Tools.LuaConsole.LoadLuaSession(filePaths[0]); GlobalWin.Tools.LuaConsole.LoadLuaSession(filePaths[0]);
} }
} }
else if (IsValidMovieExtension(ext)) else if (MovieSession.IsValidMovieExtension(ext))
{ {
StartNewMovie(new Movie(filePaths[0]), false); StartNewMovie(new Movie(filePaths[0]), false);
} }

View File

@ -1527,20 +1527,6 @@ namespace BizHawk.Client.EmuHawk
} }
private static bool IsValidMovieExtension(string ext)
{
if (ext.ToUpper() == "." + Global.Config.MovieExtension)
{
return true;
}
else if (ext.ToUpper() == ".TAS" || ext.ToUpper() == ".BKM")
{
return true;
}
return false;
}
private void LoadMoviesFromRecent(string path) private void LoadMoviesFromRecent(string path)
{ {
var movie = new Movie(path); var movie = new Movie(path);