Fix syncless recorder
This commit is contained in:
parent
a67d01f04d
commit
bcee6d4d39
|
@ -185,6 +185,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
public new virtual void SetFrame(int frame)
|
||||
{
|
||||
// this writer will never support this capability
|
||||
|
||||
// but it needs to for syncless recorder, otherwise it won't work at all
|
||||
if (W is SynclessRecorder)
|
||||
{
|
||||
W.SetFrame(frame);
|
||||
}
|
||||
}
|
||||
|
||||
/// <exception cref="InvalidOperationException">always</exception>
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public void AddFrame(IVideoProvider source)
|
||||
{
|
||||
using var bb = new BitmapBuffer(source.BufferWidth, source.BufferHeight, source.GetVideoBuffer());
|
||||
using var bb = new BitmapBuffer(source.BufferWidth, source.BufferHeight, source.GetVideoBuffer());
|
||||
string subPath = GetAndCreatePathForFrameNum(_mCurrFrame);
|
||||
string path = $"{subPath}.png";
|
||||
bb.ToSysdrawingBitmap().Save(path, ImageFormat.Png);
|
||||
|
@ -153,9 +153,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public static string GetPathFragmentForFrameNum(int index)
|
||||
{
|
||||
var chunks = StringChunkSplit(index.ToString(), 2);
|
||||
// not sure of the original purpose here, but the subfolders it makes don't seem to work right, just return frame number for now
|
||||
/*
|
||||
var chunks = StringChunkSplit(index.ToString(), 2);
|
||||
string subPath = string.Join("/", chunks);
|
||||
return subPath;
|
||||
*/
|
||||
return index.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue