diff --git a/src/Ryujinx/UI/ViewModels/AppListFavoriteComparable.cs b/src/Ryujinx/UI/ViewModels/AppListFavoriteComparable.cs
new file mode 100644
index 0000000000..e80984508e
--- /dev/null
+++ b/src/Ryujinx/UI/ViewModels/AppListFavoriteComparable.cs
@@ -0,0 +1,43 @@
+using Ryujinx.UI.App.Common;
+using System;
+
+namespace Ryujinx.Ava.UI.ViewModels
+{
+ ///
+ /// Implements a custom comparer which is used for sorting titles by favorite on a UI.
+ /// Returns a sorted list of favorites in alphabetical order, followed by all non-favorites sorted alphabetical.
+ ///
+ public readonly struct AppListFavoriteComparable : IComparable
+ {
+ ///
+ /// The application data being compared.
+ ///
+ private readonly ApplicationData app;
+
+ ///
+ /// Constructs a new with the specified application data.
+ ///
+ /// The app data being compared.
+ public AppListFavoriteComparable(ApplicationData app)
+ {
+ ArgumentNullException.ThrowIfNull(app, nameof(app));
+ this.app = app;
+ }
+
+ ///
+ public readonly int CompareTo(object o)
+ {
+ if (o is AppListFavoriteComparable other)
+ {
+ if (app.Favorite == other.app.Favorite)
+ {
+ return string.Compare(app.Name, other.app.Name, StringComparison.OrdinalIgnoreCase);
+ }
+
+ return app.Favorite ? -1 : 1;
+ }
+
+ throw new InvalidCastException($"Cannot cast {o.GetType()} to {nameof(AppListFavoriteComparable)}");
+ }
+ }
+}
diff --git a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs
index 134e903002..bd9f165b92 100644
--- a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs
+++ b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs
@@ -965,8 +965,8 @@ namespace Ryujinx.Ava.UI.ViewModels
: SortExpressionComparer.Descending(app => app.FileSize),
ApplicationSort.Path => IsAscending ? SortExpressionComparer.Ascending(app => app.Path)
: SortExpressionComparer.Descending(app => app.Path),
- ApplicationSort.Favorite => !IsAscending ? SortExpressionComparer.Ascending(app => app.Favorite)
- : SortExpressionComparer.Descending(app => app.Favorite),
+ ApplicationSort.Favorite => IsAscending ? SortExpressionComparer.Ascending(app => new AppListFavoriteComparable(app))
+ : SortExpressionComparer.Descending(app => new AppListFavoriteComparable(app)),
_ => null,
#pragma warning restore IDE0055
};