internal static void InstallEvents() { ScreenshotRequested_t.Install(x => OnScreenshotRequested?.Invoke()); ScreenshotReady_t.Install(x => { if (x.Result != Result.OK) { OnScreenshotFailed?.Invoke(x.Result); } else { OnScreenshotReady?.Invoke(new Screenshot { Value = x.Local }); } }); }
internal static void InstallEvents() { ScreenshotRequested_t.Install((ScreenshotRequested_t x) => { Action onScreenshotRequested = SteamScreenshots.OnScreenshotRequested; if (onScreenshotRequested != null) { onScreenshotRequested(); } else { } }, false); ScreenshotReady_t.Install((ScreenshotReady_t x) => { if (x.Result == Result.OK) { Action <Screenshot> onScreenshotReady = SteamScreenshots.OnScreenshotReady; if (onScreenshotReady != null) { onScreenshotReady(new Screenshot() { Value = x.Local }); } else { } } else { Action <Result> onScreenshotFailed = SteamScreenshots.OnScreenshotFailed; if (onScreenshotFailed != null) { onScreenshotFailed(x.Result); } else { } } }, false); }
void OnScreenshotReady(ScreenshotReady_t pCallback) { Debug.Log("[" + ScreenshotReady_t.k_iCallback + " - ScreenshotReady] - " + pCallback.m_hLocal + " -- " + pCallback.m_eResult); }