Add Screenshot Feature (#2354)

* Add internal screenshot  capabilities

* update version notice
This commit is contained in:
emmauss 2021-06-28 20:09:43 +00:00 committed by GitHub
parent a79b39b913
commit 28618c58d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 220 additions and 56 deletions

View file

@ -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);
}
}
}