Add JMD to config.cs, and fix whitespace on JMDWriter.cs.

My editor whitespace settings are correct now, I promise!
This commit is contained in:
goyuken 2012-05-10 00:38:26 +00:00
parent a313d3910d
commit b35ab0d936
2 changed files with 760 additions and 756 deletions

View File

@ -278,6 +278,10 @@ namespace BizHawk.MultiClient
public bool HexEditorBigEndian = false;
public int HexEditorDataSize = 1;
// Video dumping settings
public int JMDCompression = 3;
public int JMDThreads = 3;
// NESPPU Settings
public bool AutoLoadNESPPU = false;
public bool NESPPUSaveWindowPosition = true;

View File

@ -542,16 +542,16 @@ namespace BizHawk.MultiClient
{
CodecToken ret = new CodecToken();
int t = ret.numthreads;
// Deflater.DEFAULT_COMPRESSION is actually a magic value and is not in the range NO_COMPRESSION..BEST_COMPRESSION
// so our default is just a guesstimate in the middle
int c = (Deflater.BEST_COMPRESSION + Deflater.NO_COMPRESSION) / 2;
// load from config and sanitize
int t = Math.Min(Math.Max(Global.Config.JMDThreads, 1), 6);
int c = Math.Min(Math.Max(Global.Config.JMDCompression, Deflater.NO_COMPRESSION), Deflater.BEST_COMPRESSION);
if (!JMDForm.DoCompressionDlg(ref t, ref c, 1, 6, Deflater.NO_COMPRESSION, Deflater.BEST_COMPRESSION, hwnd))
return null;
ret.numthreads = t;
ret.compressionlevel = c;
Global.Config.JMDThreads = ret.numthreads = t;
Global.Config.JMDCompression = ret.compressionlevel = c;
return ret;
}