aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL/Renderer.cs
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.OpenGL/Renderer.cs
parenta79b39b91347816ea14677b58af738b70df03e9c (diff)
Add Screenshot Feature (#2354)
* Add internal screenshot capabilities * update version notice
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Renderer.cs')
-rw-r--r--Ryujinx.Graphics.OpenGL/Renderer.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Renderer.cs b/Ryujinx.Graphics.OpenGL/Renderer.cs
index a2be4373..001cac8d 100644
--- a/Ryujinx.Graphics.OpenGL/Renderer.cs
+++ b/Ryujinx.Graphics.OpenGL/Renderer.cs
@@ -28,6 +28,8 @@ namespace Ryujinx.Graphics.OpenGL
private Sync _sync;
+ public event EventHandler<ScreenCaptureImageInfo> ScreenCaptured;
+
internal ResourcePool ResourcePool { get; }
internal int BufferCount { get; private set; }
@@ -196,5 +198,15 @@ namespace Ryujinx.Graphics.OpenGL
{
_sync.Wait(id);
}
+
+ public void Screenshot()
+ {
+ _window.ScreenCaptureRequested = true;
+ }
+
+ public void OnScreenCaptured(ScreenCaptureImageInfo bitmap)
+ {
+ ScreenCaptured?.Invoke(this, bitmap);
+ }
}
}