Select between JMD and AVI at save file dialog.

This commit is contained in:
goyuken 2012-05-07 23:18:08 +00:00
parent ab6f9b175f
commit 037870eb43
2 changed files with 12 additions and 3 deletions

View File

@ -181,7 +181,7 @@ namespace BizHawk.MultiClient
public void OpenFile(string baseName)
{
string ext = Path.GetExtension(baseName);
if (ext == null || ext.ToLower() != "jmd")
if (ext == null || ext.ToLower() != ".jmd")
baseName = baseName + ".jmd";
JMDfile = File.Open(baseName, FileMode.OpenOrCreate);

View File

@ -2656,7 +2656,7 @@ namespace BizHawk.MultiClient
sfd.FileName = "NULL";
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.AVIPath, "");
}
sfd.Filter = "AVI (*.avi)|*.avi|All Files|*.*";
sfd.Filter = "AVI (*.avi)|*.avi|JMD (*.jmd)|*.jmd|All Files|*.*";
Global.Sound.StopSound();
var result = sfd.ShowDialog();
Global.Sound.StartSound();
@ -2666,7 +2666,16 @@ namespace BizHawk.MultiClient
//TODO - cores should be able to specify exact values for these instead of relying on this to calculate them
int fps = (int)(Global.Emulator.CoreOutputComm.VsyncRate * 0x01000000);
IVideoWriter aw = new AviWriter(); // new JMDWriter();
IVideoWriter aw;
string ext = Path.GetExtension(sfd.FileName).ToLower();
if (ext == ".jmd")
aw = new JMDWriter();
else if (ext == ".avi")
aw = new AviWriter();
else // hmm?
aw = new AviWriter();
try
{
aw.SetMovieParameters(fps, 0x01000000);