aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.GAL
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.GAL')
-rw-r--r--Ryujinx.Graphics.GAL/IRenderer.cs4
-rw-r--r--Ryujinx.Graphics.GAL/ScreenCaptureImageInfo.cs22
2 files changed, 26 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.GAL/IRenderer.cs b/Ryujinx.Graphics.GAL/IRenderer.cs
index d03cb4c0..18f10915 100644
--- a/Ryujinx.Graphics.GAL/IRenderer.cs
+++ b/Ryujinx.Graphics.GAL/IRenderer.cs
@@ -6,6 +6,8 @@ namespace Ryujinx.Graphics.GAL
{
public interface IRenderer : IDisposable
{
+ event EventHandler<ScreenCaptureImageInfo> ScreenCaptured;
+
IPipeline Pipeline { get; }
IWindow Window { get; }
@@ -44,5 +46,7 @@ namespace Ryujinx.Graphics.GAL
void WaitSync(ulong id);
void Initialize(GraphicsDebugLevel logLevel);
+
+ void Screenshot();
}
}
diff --git a/Ryujinx.Graphics.GAL/ScreenCaptureImageInfo.cs b/Ryujinx.Graphics.GAL/ScreenCaptureImageInfo.cs
new file mode 100644
index 00000000..227d64b6
--- /dev/null
+++ b/Ryujinx.Graphics.GAL/ScreenCaptureImageInfo.cs
@@ -0,0 +1,22 @@
+namespace Ryujinx.Graphics.GAL
+{
+ public struct ScreenCaptureImageInfo
+ {
+ public ScreenCaptureImageInfo(int width, int height, bool isBgra, byte[] data, bool flipX, bool flipY)
+ {
+ Width = width;
+ Height = height;
+ IsBgra = isBgra;
+ Data = data;
+ FlipX = flipX;
+ FlipY = flipY;
+ }
+
+ public int Width { get; }
+ public int Height { get; }
+ public byte[] Data { get; }
+ public bool IsBgra { get; }
+ public bool FlipX { get; }
+ public bool FlipY { get; }
+ }
+} \ No newline at end of file