diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Misc/CaptureScreenshot.h |
Diffstat (limited to 'Runtime/Misc/CaptureScreenshot.h')
-rw-r--r-- | Runtime/Misc/CaptureScreenshot.h | 30 |
1 files changed, 30 insertions, 0 deletions
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 <string> + +void QueueScreenshot (const std::string& path, int superSize); +bool IsScreenshotQueued (); +void UpdateCaptureScreenshot (); +void FinishAllCaptureScreenshot (); + +#endif + + +#endif |