From a0111d1c08ee9d4bec04b6ec9e29ea59f2663403 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 27 Oct 2012 00:19:43 +0000 Subject: [PATCH] Lua - implement client.screenshottoclipboard() and client.setscreenshotosd() --- BizHawk.MultiClient/LuaImplementation.cs | 12 ++++++++++++ BizHawk.MultiClient/MainForm.cs | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/BizHawk.MultiClient/LuaImplementation.cs b/BizHawk.MultiClient/LuaImplementation.cs index 15dd6a0776..16b58d197e 100644 --- a/BizHawk.MultiClient/LuaImplementation.cs +++ b/BizHawk.MultiClient/LuaImplementation.cs @@ -512,6 +512,8 @@ namespace BizHawk.MultiClient "screenwidth", "screenheight", "screenshot", + "screenshottoclipboard", + "setscreenshotosd", }; public static string[] FormsFunctions = new string[] @@ -2054,6 +2056,16 @@ namespace BizHawk.MultiClient } } + public void client_screenshottoclipboard() + { + Global.MainForm.TakeScreenshotToClipboard(); + } + + public void client_setscreenshotosd(bool value) + { + Global.Config.Screenshot_CaptureOSD = value; + } + public int client_screenwidth() { return Global.RenderPanel.NativeSize.Width; diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index f7d314f3b5..21158e52ed 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -2469,7 +2469,7 @@ namespace BizHawk.MultiClient return image; } - void TakeScreenshotToClipboard() + public void TakeScreenshotToClipboard() { using (var img = Global.Config.Screenshot_CaptureOSD ? CaptureOSD() : MakeScreenshotImage()) {