static Scope CreateScopeFromGameInfo(GameInfo gameInfo) { var scope = new Scope(new SentryOptions { AttachStacktrace = false, ReportAssemblies = false, }); var contexts = scope.Contexts; contexts.Clear( ); contexts["runtime"] = new Runtime { Name = gameInfo.Runtime, }; var gpu = gameInfo.Gpu; contexts["gpu"] = new Gpu { Id = gpu.Id, ApiType = gpu.GraphicsDeviceType, MemorySize = gpu.MemorySize, MultiThreadedRendering = gpu.MultiThreaded, Name = gpu.Name, VendorId = gpu.VendorId, VendorName = gpu.VendorName, Version = gpu.Version, }; contexts["app"] = new App { Name = gameInfo.AppName, Version = gameInfo.GameVersion, }; contexts["os"] = new Sentry.Protocol.OperatingSystem( ) { RawDescription = gameInfo.OperatingSystem }; return(scope); }
private void PopulateOperatingSystem(OperatingSystem operatingSystem) { operatingSystem.RawDescription = _mainThreadData.OperatingSystem; }