Select between JMD and AVI at save file dialog.
This commit is contained in:
parent
ab6f9b175f
commit
037870eb43
|
@ -181,7 +181,7 @@ namespace BizHawk.MultiClient
|
||||||
public void OpenFile(string baseName)
|
public void OpenFile(string baseName)
|
||||||
{
|
{
|
||||||
string ext = Path.GetExtension(baseName);
|
string ext = Path.GetExtension(baseName);
|
||||||
if (ext == null || ext.ToLower() != "jmd")
|
if (ext == null || ext.ToLower() != ".jmd")
|
||||||
baseName = baseName + ".jmd";
|
baseName = baseName + ".jmd";
|
||||||
|
|
||||||
JMDfile = File.Open(baseName, FileMode.OpenOrCreate);
|
JMDfile = File.Open(baseName, FileMode.OpenOrCreate);
|
||||||
|
|
|
@ -2656,7 +2656,7 @@ namespace BizHawk.MultiClient
|
||||||
sfd.FileName = "NULL";
|
sfd.FileName = "NULL";
|
||||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.AVIPath, "");
|
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();
|
Global.Sound.StopSound();
|
||||||
var result = sfd.ShowDialog();
|
var result = sfd.ShowDialog();
|
||||||
Global.Sound.StartSound();
|
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
|
//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);
|
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
|
try
|
||||||
{
|
{
|
||||||
aw.SetMovieParameters(fps, 0x01000000);
|
aw.SetMovieParameters(fps, 0x01000000);
|
||||||
|
|
Loading…
Reference in New Issue