Save screenshots via the frame buffer.

This commit is contained in:
Paul Chote
2019-08-31 18:04:41 +01:00
committed by teinarss
parent c0ee346c1c
commit 1d106e71c4
6 changed files with 31 additions and 68 deletions

View File

@@ -49,7 +49,6 @@ namespace OpenRA.Platforms.Default
Action<object> doDrawPrimitives;
Action<object> doEnableScissor;
Action<object> doSetBlendMode;
Action<object> doSaveScreenshot;
public ThreadedGraphicsContext(Sdl2GraphicsContext context, int batchSize)
{
@@ -108,7 +107,6 @@ namespace OpenRA.Platforms.Default
context.EnableScissor(t.Item1, t.Item2, t.Item3, t.Item4);
};
doSetBlendMode = mode => { context.SetBlendMode((BlendMode)mode); };
doSaveScreenshot = path => context.SaveScreenshot((string)path);
Monitor.Pulse(syncObject);
}
@@ -447,11 +445,6 @@ namespace OpenRA.Platforms.Default
{
Post(doSetBlendMode, mode);
}
public void SaveScreenshot(string path)
{
Post(doSaveScreenshot, path);
}
}
class ThreadedFrameBuffer : IFrameBuffer