Esempio n. 1
0
        public void Init(Config config, IPALogger logger, Zenjector zenjector)
        {
            Instance        = this;
            Log             = logger;
            CurrentSettings = config.Generated <Settings>();

            Highlights.HighlightScope[] requiredScopes = new
                                                         Highlights.HighlightScope[2]
            {
                Highlights.HighlightScope.Highlights,
                Highlights.HighlightScope.HighlightsRecordVideo,
            };

            var status = Highlights.CreateHighlightsSDK("SaberHighlight", requiredScopes);

            if (status != Highlights.ReturnCode.SUCCESS)
            {
                Log.Critical($"Failed to initialize highlights! ({status})");
                Highlights.UpdateLog();
                return;
            }

            Highlights.RequestPermissions(Highlight.LogCallback);

            Highlights.HighlightDefinition[] highlightDefinitions = new Highlights.HighlightDefinition[1];

            highlightDefinitions[0].Id            = "MAP_PLAY";
            highlightDefinitions[0].HighlightTags = Highlights.HighlightType.Achievement;

            highlightDefinitions[0].Significance = Highlights.HighlightSignificance.Good;

            highlightDefinitions[0].UserDefaultInterest  = true;
            highlightDefinitions[0].NameTranslationTable = new Highlights.TranslationEntry[]
            {
                new Highlights.TranslationEntry("en-US", "Map play"),
            };

            Highlights.ConfigureHighlights(highlightDefinitions, "en-US", Highlight.LogCallback);

            Highlights.OpenGroupParams ogp1 = new Highlights.OpenGroupParams();
            ogp1.Id = "MAP_PLAY_GROUP";
            ogp1.GroupDescriptionTable = new Highlights.TranslationEntry[]
            {
                new Highlights.TranslationEntry("en-US", "Map play group"),
            };

            Highlights.OpenGroup(ogp1, Highlight.LogCallback);

            zenjector.Install <Installer>(Location.Player);

            Log.Info("Loaded.");
        }
Esempio n. 2
0
 private void Update()
 {
     // This will update any debug information from the Geforce Experience SDK.
     Highlights.UpdateLog();
 }
Esempio n. 3
0
 private void Update()
 {
     Highlights.UpdateLog();
 }