aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.GAL
diff options
context:
space:
mode:
authoremmauss <emmausssss@gmail.com>2021-06-28 20:09:43 +0000
committerGitHub <noreply@github.com>2021-06-28 22:09:43 +0200
commit28618c58d7ee1ae63fc57deca791a64ab38b57af (patch)
treece7e84d5301ca6222cb2cdad7cf82eb2a1682ce3 /Ryujinx.Graphics.GAL
parenta79b39b91347816ea14677b58af738b70df03e9c (diff)
Add Screenshot Feature (#2354)
* Add internal screenshot capabilities * update version notice
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