1 Commits
2.0 ... main

Author SHA1 Message Date
e1d71ee33a Allow disable display self-analysis alert 2025-11-01 00:23:53 +01:00
7 changed files with 27 additions and 5 deletions

View File

@@ -8,6 +8,7 @@ public class PlayerPerformanceConfig : IMareConfiguration
public bool AutoPausePlayersExceedingThresholds { get; set; } = true;
public bool NotifyAutoPauseDirectPairs { get; set; } = true;
public bool NotifyAutoPauseGroupPairs { get; set; } = true;
public bool ShowSelfAnalysisWarnings { get; set; } = true;
public int VRAMSizeAutoPauseThresholdMiB { get; set; } = 500;
public int TrisAutoPauseThresholdThousands { get; set; } = 400;
public bool IgnoreDirectPairs { get; set; } = true;

View File

@@ -3,7 +3,7 @@
<PropertyGroup>
<AssemblyName>UmbraSync</AssemblyName>
<RootNamespace>UmbraSync</RootNamespace>
<Version>0.1.9.5</Version>
<Version>0.1.9.6</Version>
</PropertyGroup>
<ItemGroup>

View File

@@ -3,6 +3,7 @@ using Lumina.Data.Files;
using MareSynchronos.API.Data;
using MareSynchronos.API.Data.Enum;
using MareSynchronos.FileCache;
using MareSynchronos.MareConfiguration;
using MareSynchronos.MareConfiguration.Models;
using MareSynchronos.Services.Mediator;
using MareSynchronos.UI;
@@ -15,6 +16,7 @@ public sealed class CharacterAnalyzer : DisposableMediatorSubscriberBase
{
private readonly FileCacheManager _fileCacheManager;
private readonly XivDataAnalyzer _xivDataAnalyzer;
private readonly PlayerPerformanceConfigService _playerPerformanceConfigService;
private CancellationTokenSource? _analysisCts;
private CancellationTokenSource _baseAnalysisCts = new();
private string _lastDataHash = string.Empty;
@@ -29,7 +31,7 @@ public sealed class CharacterAnalyzer : DisposableMediatorSubscriberBase
private bool _sizeWarningShown;
private bool _triangleWarningShown;
public CharacterAnalyzer(ILogger<CharacterAnalyzer> logger, MareMediator mediator, FileCacheManager fileCacheManager, XivDataAnalyzer modelAnalyzer)
public CharacterAnalyzer(ILogger<CharacterAnalyzer> logger, MareMediator mediator, FileCacheManager fileCacheManager, XivDataAnalyzer modelAnalyzer, PlayerPerformanceConfigService playerPerformanceConfigService)
: base(logger, mediator)
{
Mediator.Subscribe<CharacterDataCreatedMessage>(this, (msg) =>
@@ -40,6 +42,7 @@ public sealed class CharacterAnalyzer : DisposableMediatorSubscriberBase
});
_fileCacheManager = fileCacheManager;
_xivDataAnalyzer = modelAnalyzer;
_playerPerformanceConfigService = playerPerformanceConfigService;
}
public int CurrentFile { get; internal set; }
@@ -315,6 +318,12 @@ public sealed class CharacterAnalyzer : DisposableMediatorSubscriberBase
return;
}
if (!_playerPerformanceConfigService.Current.ShowSelfAnalysisWarnings)
{
ResetThresholdFlagsIfNeeded(summary);
return;
}
bool sizeExceeded = summary.TotalCompressedSize >= NotificationSizeThreshold;
bool trianglesExceeded = summary.TotalTriangles >= NotificationTriangleThreshold;
List<string> exceededReasons = new();

View File

@@ -169,6 +169,10 @@ public sealed class ChangelogUi : WindowMediatorSubscriberBase
{
return new List<ChangelogEntry>
{
new(new Version(0, 1, 9, 6), "0.1.9.6", new List<ChangelogLine>
{
new("Possibilité de désactiver l'alerte self-analysis (Settings => Performance)."),
}),
new(new Version(0, 1, 9, 5), "0.1.9.5", new List<ChangelogLine>
{
new("Fix l'affichage de la bulle dans la liste du groupe."),

View File

@@ -1328,6 +1328,14 @@ public class SettingsUi : WindowMediatorSubscriberBase
_uiShared.BigText("Global Configuration");
bool showSelfAnalysisWarnings = _playerPerformanceConfigService.Current.ShowSelfAnalysisWarnings;
if (ImGui.Checkbox("Display self-analysis warnings", ref showSelfAnalysisWarnings))
{
_playerPerformanceConfigService.Current.ShowSelfAnalysisWarnings = showSelfAnalysisWarnings;
_playerPerformanceConfigService.Save();
}
_uiShared.DrawHelpText("Disable to suppress UmbraSync chat warnings when your character exceeds the self-analysis thresholds.");
bool alwaysShrinkTextures = _playerPerformanceConfigService.Current.TextureShrinkMode == TextureShrinkMode.Always;
bool deleteOriginalTextures = _playerPerformanceConfigService.Current.TextureShrinkDeleteOriginal;