From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/Misc/CaptureScreenshot.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Runtime/Misc/CaptureScreenshot.h (limited to 'Runtime/Misc/CaptureScreenshot.h') diff --git a/Runtime/Misc/CaptureScreenshot.h b/Runtime/Misc/CaptureScreenshot.h new file mode 100644 index 0000000..acf318c --- /dev/null +++ b/Runtime/Misc/CaptureScreenshot.h @@ -0,0 +1,30 @@ +#ifndef _CAPTURESCREENSHOT_H +#define _CAPTURESCREENSHOT_H + +#include "Configuration/UnityConfigure.h" + +#undef CAPTURE_SCREENSHOT_AVAILABLE + +// In web player we never capture screenshots. Don't even compile the code in (saves whole pnglib!) +#if (WEBPLUG && !SUPPORT_REPRODUCE_LOG && !UNITY_PEPPER) +#define CAPTURE_SCREENSHOT_AVAILABLE 0 +#else +#define CAPTURE_SCREENSHOT_AVAILABLE 1 +// Player connection might be used to transfer screenshots and async is a pain there +#define CAPTURE_SCREENSHOT_THREAD (SUPPORT_THREADS && !UNITY_WII && !ENABLE_PLAYERCONNECTION) +#endif + + +#if CAPTURE_SCREENSHOT_AVAILABLE + +#include + +void QueueScreenshot (const std::string& path, int superSize); +bool IsScreenshotQueued (); +void UpdateCaptureScreenshot (); +void FinishAllCaptureScreenshot (); + +#endif + + +#endif -- cgit v1.1-26-g67d0