diff --git a/LightlessSync/LightlessSync.csproj b/LightlessSync/LightlessSync.csproj index 8c54253..95d41d8 100644 --- a/LightlessSync/LightlessSync.csproj +++ b/LightlessSync/LightlessSync.csproj @@ -3,7 +3,7 @@ - 1.11.6 + 1.11.7 https://github.com/Light-Public-Syncshells/LightlessClient diff --git a/LightlessSync/Services/ServerConfiguration/ServerConfigurationManager.cs b/LightlessSync/Services/ServerConfiguration/ServerConfigurationManager.cs index 67c16e5..f90d7a2 100644 --- a/LightlessSync/Services/ServerConfiguration/ServerConfigurationManager.cs +++ b/LightlessSync/Services/ServerConfiguration/ServerConfigurationManager.cs @@ -299,7 +299,7 @@ public class ServerConfigurationManager internal void AddPairTag(string tag) { - if (tag.Length > _maxCharactersFolder) + if (tag.Length <= _maxCharactersFolder) { CurrentPairTagStorage().ServerAvailablePairTags.Add(tag); _pairTagConfig.Save(); @@ -313,7 +313,7 @@ public class ServerConfigurationManager internal void AddSyncshellTag(string tag) { - if (tag.Length > _maxCharactersFolder) + if (tag.Length <= _maxCharactersFolder) { CurrentSyncshellTagStorage().ServerAvailableSyncshellTags.Add(tag); _syncshellTagConfig.Save(); diff --git a/LightlessSync/UI/CompactUI.cs b/LightlessSync/UI/CompactUI.cs index 54a13e4..515d4ce 100644 --- a/LightlessSync/UI/CompactUI.cs +++ b/LightlessSync/UI/CompactUI.cs @@ -431,10 +431,11 @@ public class CompactUi : WindowMediatorSubscriberBase if (groupedfiles != null) { //Checking of VRAM threshhold - var actualVramUsage = groupedfiles.SingleOrDefault(v => string.Equals(v.Key, "tex", StringComparison.Ordinal)).Sum(f => f.OriginalSize); + var texGroup = groupedfiles.SingleOrDefault(v => string.Equals(v.Key, "tex", StringComparison.Ordinal)); + var actualVramUsage = texGroup != null ? texGroup.Sum(f => f.OriginalSize) : 0L; var isOverVRAMUsage = _playerPerformanceConfig.Current.VRAMSizeWarningThresholdMiB * 1024 * 1024 < actualVramUsage; - if (isOverTriHold || isOverVRAMUsage) + if ((isOverTriHold || isOverVRAMUsage) && _playerPerformanceConfig.Current.WarnOnExceedingThresholds) { ImGui.SameLine(); _uiSharedService.IconText(FontAwesomeIcon.ExclamationTriangle, UIColors.Get("LightlessYellow"));