simplify a few mainform methods with the ToClipBoard() extension method

This commit is contained in:
adelikat 2020-07-02 17:25:46 -05:00
parent b09b9681e2
commit eede99a505
1 changed files with 4 additions and 12 deletions

View File

@ -1058,23 +1058,15 @@ namespace BizHawk.Client.EmuHawk
public void TakeScreenshotToClipboard()
{
using (var bb = Config.ScreenshotCaptureOsd ? CaptureOSD() : MakeScreenshotImage())
{
using var img = bb.ToSysdrawingBitmap();
Clipboard.SetImage(img);
}
using var bb = Config.ScreenshotCaptureOsd ? CaptureOSD() : MakeScreenshotImage();
bb.ToSysdrawingBitmap().ToClipBoard();
AddOnScreenMessage("Screenshot (raw) saved to clipboard.");
}
private void TakeScreenshotClientToClipboard()
{
using (var bb = DisplayManager.RenderOffscreen(_currentVideoProvider, Config.ScreenshotCaptureOsd))
{
using var img = bb.ToSysdrawingBitmap();
Clipboard.SetImage(img);
}
using var bb = DisplayManager.RenderOffscreen(_currentVideoProvider, Config.ScreenshotCaptureOsd);
bb.ToSysdrawingBitmap().ToClipBoard();
AddOnScreenMessage("Screenshot (client) saved to clipboard.");
}