public static int InitHighlightsSDK(bool isCheck) { try { Highlights.HighlightScope[] RequiredScopes = { Highlights.HighlightScope.Highlights, Highlights.HighlightScope.HighlightsRecordVideo, Highlights.HighlightScope.HighlightsRecordScreenshot }; Highlights.ReturnCode create = Highlights.CreateHighlightsSDK("Echo VR", RequiredScopes); if (create != Highlights.ReturnCode.SUCCESS) { Logger.LogRow(Logger.LogType.Error, "Failed to initialize Highlights on first try: " + create); create = Highlights.CreateHighlightsSDK("Echo VR", RequiredScopes); if (create != Highlights.ReturnCode.SUCCESS) { Logger.LogRow(Logger.LogType.Error, "Failed to initialize Highlights: " + create); didHighlightsInit = false; isNVHighlightsSupported = false; return(-1); } } if (isCheck) { Highlights.ReleaseHighlightsSDK(); isNVHighlightsSupported = true; return(1); } didHighlightsInit = true; return(1); } catch (Exception e) { Logger.LogRow(Logger.LogType.Error, $"Failed to initialize Highlights: {e}"); didHighlightsInit = false; isNVHighlightsSupported = false; return(-1); } }
public static void LogCallback(Highlights.ReturnCode ret, int id) { Plugin.Log.Debug($"Callback from NVIDIA SDK with code {ret} for ID {id}."); }