Ryujinx/src
SamusAranX 623604c391
Overhaul of string formatting/parsing/sorting logic for TimeSpans, DateTimes, and file sizes (#4956)
* Fixed formatting/parsing issues with ApplicationData properties TimePlayed, LastPlayed, and FileSize

Replaced double-based TimePlayed property with TimeSpan?-based one in ApplicationData and ApplicationMetadata
Added a migration for TimePlayed, just like in #4861
Consolidated ApplicationData's FileSize* properties into one FileSize property
Added a formatting/parsing helper class ValueFormatUtils for TimeSpans, DateTimes, and file sizes
Added new value converters for TimeSpans and file sizes for the Avalonia UI
Added TimePlayedSortComparer
Fixed sort order in LastPlayedSortComparer
Fixed sort order for ApplicationData fields TimePlayed, LastPlayed, and FileSize
Fixed crashes caused by SortHelper
Replaced SystemInfo.ToMiBString with ToGiBString backed by ValueFormatUtils
Replaced SaveModel.GetSizeString() with ValueFormatUtils

* Additional ApplicationLibrary changes that got lost in the last commit

* Removed unneeded usings

* Removed converters as they are no longer needed

* Updated comment on FormatDateTime

* Removed base10 parameter from ValueFormatUtils

FormatFileSize now always returns base 2 values with base 10 units
Made ParseFileSize capable of parsing both base 2 and base 10 units

* Removed nullable attribute from TimePlayed property

Centralized TimePlayed update code into ApplicationMetadata

* Changed UpdateTimePlayed() to use TimeSpan logic

* Removed JsonIgnore attributes from ApplicationData

* Implemented requested format changes

* Fixed mistakes in method documentation comments

* Made it so the Last Played value "Never" is localized in the Avalonia UI

* Implemented suggestions

* Remove unused import

* Did a comment refinement pass in ValueFormatUtils.cs

* Reordered ValueFormatUtils methods and sorted them into #regions

* Integrated functionality from #5056

Also removed Logger print from last_played migration code

* Implemented suggestions

* Moved ValueFormatUtils and SystemInfo to namespace Ryujinx.Ui.Common

* common: Respect proper value format convention and use base10 by default

This could be discuss again in another issue/PR, for now revert to the previous behavior.

Signed-off-by: Mary Guillemard <mary@mary.zone>

---------

Signed-off-by: Mary Guillemard <mary@mary.zone>
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
Co-authored-by: Mary Guillemard <mary@mary.zone>
2023-11-06 22:47:44 +01:00
..
ARMeilleure Better handle instruction aborts when hitting unmapped memory (#5869) 2023-11-05 12:32:17 +01:00
Ryujinx Overhaul of string formatting/parsing/sorting logic for TimeSpans, DateTimes, and file sizes (#4956) 2023-11-06 22:47:44 +01:00
Ryujinx.Audio Fix audio renderer compressor effect (#5742) 2023-09-29 10:48:49 +00:00
Ryujinx.Audio.Backends.OpenAL Add workflow to automatically check code style issues for PRs (#4670) 2023-07-24 18:35:04 +02:00
Ryujinx.Audio.Backends.SDL2 Add workflow to automatically check code style issues for PRs (#4670) 2023-07-24 18:35:04 +02:00
Ryujinx.Audio.Backends.SoundIo Add workflow to automatically check code style issues for PRs (#4670) 2023-07-24 18:35:04 +02:00
Ryujinx.Ava Overhaul of string formatting/parsing/sorting logic for TimeSpans, DateTimes, and file sizes (#4956) 2023-11-06 22:47:44 +01:00
Ryujinx.Common Overhaul of string formatting/parsing/sorting logic for TimeSpans, DateTimes, and file sizes (#4956) 2023-11-06 22:47:44 +01:00
Ryujinx.Cpu Add VTimer as alternative interrupt method on Apple Hypervisor (#5663) 2023-09-26 01:18:32 +02:00
Ryujinx.Graphics.Device Add workflow to automatically check code style issues for PRs (#4670) 2023-07-24 18:35:04 +02:00
Ryujinx.Graphics.GAL GPU: Add fallback when textureGatherOffsets is not supported (#5792) 2023-10-20 15:05:09 +02:00
Ryujinx.Graphics.Gpu Implement copy dependency for depth and color textures (#4365) 2023-10-31 19:00:39 -03:00
Ryujinx.Graphics.Host1x Add workflow to automatically check code style issues for PRs (#4670) 2023-07-24 18:35:04 +02:00
Ryujinx.Graphics.Nvdec Add workflow to automatically check code style issues for PRs (#4670) 2023-07-24 18:35:04 +02:00
Ryujinx.Graphics.Nvdec.FFmpeg Add workflow to automatically check code style issues for PRs (#4670) 2023-07-24 18:35:04 +02:00
Ryujinx.Graphics.Nvdec.Vp9 [Ryujinx.Graphics.Nvdec.Vp9] Address dotnet-format issues (#5371) 2023-06-28 09:26:39 +02:00
Ryujinx.Graphics.OpenGL Implement copy dependency for depth and color textures (#4365) 2023-10-31 19:00:39 -03:00
Ryujinx.Graphics.Shader Fix NRE on gather operations with depth compare on macOS (#5832) 2023-10-22 20:31:36 +02:00
Ryujinx.Graphics.Texture Fix layer size for 3D textures with NPOT depth (#5640) 2023-09-04 20:14:08 -03:00
Ryujinx.Graphics.Vic Add workflow to automatically check code style issues for PRs (#4670) 2023-07-24 18:35:04 +02:00
Ryujinx.Graphics.Video Add workflow to automatically check code style issues for PRs (#4670) 2023-07-24 18:35:04 +02:00
Ryujinx.Graphics.Vulkan Implement copy dependency for depth and color textures (#4365) 2023-10-31 19:00:39 -03:00
Ryujinx.Headless.SDL2 Add ldn:u implementation, INetworkClient interface and DisabledLdnClient (#5652) 2023-09-25 23:50:43 +02:00
Ryujinx.HLE Fix AddSessionObj NRE regression (#5875) 2023-11-01 21:47:40 +01:00
Ryujinx.Horizon Horizon: Migrate usb and psc services (#5800) 2023-10-13 23:13:15 -03:00
Ryujinx.Horizon.Common Add workflow to automatically check code style issues for PRs (#4670) 2023-07-24 18:35:04 +02:00
Ryujinx.Horizon.Generators Horizon: Migrate usb and psc services (#5800) 2023-10-13 23:13:15 -03:00
Ryujinx.Horizon.Kernel.Generators Add workflow to automatically check code style issues for PRs (#4670) 2023-07-24 18:35:04 +02:00
Ryujinx.Input Revert "Ava UI: Input Menu Refactor (#4998)" 2023-10-21 15:19:21 +02:00
Ryujinx.Input.SDL2 [Ryujinx.Input.SDL2] Address dotnet-format issues (#5385) 2023-06-26 01:55:25 +00:00
Ryujinx.Memory [Ryujinx.Memory] Address dotnet-format issues (#5386) 2023-06-28 18:34:00 +02:00
Ryujinx.SDL2.Common Revert "sdl: set SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS to 0 (#5433)" (#5439) 2023-07-06 18:08:14 +02:00
Ryujinx.ShaderTools Geometry shader emulation for macOS (#5551) 2023-08-29 21:10:34 -03:00
Ryujinx.Tests [Hotfix] hid: Prevent out of bounds array access (#5547) 2023-08-10 00:29:15 -03:00
Ryujinx.Tests.Memory Add workflow to automatically check code style issues for PRs (#4670) 2023-07-24 18:35:04 +02:00
Ryujinx.Tests.Unicorn Add workflow to automatically check code style issues for PRs (#4670) 2023-07-24 18:35:04 +02:00
Ryujinx.Ui.Common Overhaul of string formatting/parsing/sorting logic for TimeSpans, DateTimes, and file sizes (#4956) 2023-11-06 22:47:44 +01:00
Ryujinx.Ui.LocaleGenerator Strings should not be concatenated using '+' in a loop (#5664) 2023-10-05 12:41:00 +02:00
Spv.Generator Declare and use gl_PerVertex block for VTG per-vertex built-ins (#5576) 2023-08-16 23:16:25 +02:00