mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-02-24 06:04:33 +01:00
UI: Fix negative space savings in XCI trimmer
This commit is contained in:
parent
0bacdb8765
commit
e6644626fc
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -364,7 +364,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…
x
Reference in New Issue
Block a user