mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-12 10:37:06 +00:00
UI: Fix negative space savings in XCI trimmer
This commit is contained in:
parent
8726331a10
commit
c8af900b10
3 changed files with 5 additions and 4 deletions
|
|
@ -15,7 +15,7 @@
|
||||||
<PackageVersion Include="DiscordRichPresence" Version="1.2.1.24" />
|
<PackageVersion Include="DiscordRichPresence" Version="1.2.1.24" />
|
||||||
<PackageVersion Include="DynamicData" Version="9.0.4" />
|
<PackageVersion Include="DynamicData" Version="9.0.4" />
|
||||||
<PackageVersion Include="FluentAvaloniaUI" Version="2.0.5" />
|
<PackageVersion Include="FluentAvaloniaUI" Version="2.0.5" />
|
||||||
<PackageVersion Include="Gommon" Version="2.6.6" />
|
<PackageVersion Include="Gommon" Version="2.6.8" />
|
||||||
<PackageVersion Include="GtkSharp.Dependencies" Version="1.1.1" />
|
<PackageVersion Include="GtkSharp.Dependencies" Version="1.1.1" />
|
||||||
<PackageVersion Include="GtkSharp.Dependencies.osx" Version="0.0.5" />
|
<PackageVersion Include="GtkSharp.Dependencies.osx" Version="0.0.5" />
|
||||||
<PackageVersion Include="Humanizer" Version="2.14.1" />
|
<PackageVersion Include="Humanizer" Version="2.14.1" />
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Data;
|
using Avalonia.Data;
|
||||||
using Avalonia.Data.Converters;
|
using Avalonia.Data.Converters;
|
||||||
|
using Gommon;
|
||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.UI.Common.Models;
|
using Ryujinx.UI.Common.Models;
|
||||||
using System;
|
using System;
|
||||||
|
|
@ -32,11 +33,11 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||||
|
|
||||||
if (app.CurrentSavingsB < app.PotentialSavingsB)
|
if (app.CurrentSavingsB < app.PotentialSavingsB)
|
||||||
{
|
{
|
||||||
return LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.TitleXCICanSaveLabel, (app.PotentialSavingsB - app.CurrentSavingsB) / _bytesPerMB);
|
return LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.TitleXCICanSaveLabel, ((app.PotentialSavingsB - app.CurrentSavingsB) / _bytesPerMB).CoerceAtLeast(0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.TitleXCISavingLabel, app.CurrentSavingsB / _bytesPerMB);
|
return LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.TitleXCISavingLabel, (app.CurrentSavingsB / _bytesPerMB).CoerceAtLeast(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -361,7 +361,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
value = _processingApplication.Value with { PercentageProgress = null };
|
value = _processingApplication.Value with { PercentageProgress = null };
|
||||||
|
|
||||||
if (value.HasValue)
|
if (value.HasValue)
|
||||||
_displayedXCIFiles.ReplaceWith(value.Value);
|
_displayedXCIFiles.ReplaceWith(value);
|
||||||
|
|
||||||
_processingApplication = value;
|
_processingApplication = value;
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue