diff --git a/src/core/fullscreen_ui.cpp b/src/core/fullscreen_ui.cpp index 285d428d4..fec8172f6 100644 --- a/src/core/fullscreen_ui.cpp +++ b/src/core/fullscreen_ui.cpp @@ -7878,7 +7878,11 @@ void FullscreenUI::PopulateGameListEntryList() // fallback to title when all else is equal const int res = StringUtil::CompareNoCase(lhs->GetSortTitle(), rhs->GetSortTitle()); - return reverse ? (res > 0) : (res < 0); + if (res != 0) + return reverse ? (res > 0) : (res < 0); + + // fallback to path when all else is equal + return reverse ? (lhs->path > rhs->path) : (lhs->path < rhs->path); }); } diff --git a/src/duckstation-qt/gamelistwidget.cpp b/src/duckstation-qt/gamelistwidget.cpp index cd15de071..2b93d4e56 100644 --- a/src/duckstation-qt/gamelistwidget.cpp +++ b/src/duckstation-qt/gamelistwidget.cpp @@ -814,7 +814,12 @@ void GameListModel::refresh() bool GameListModel::titlesLessThan(const GameList::Entry* left, const GameList::Entry* right) const { - return (StringUtil::CompareNoCase(left->GetSortTitle(), right->GetSortTitle()) < 0); + const s32 res = StringUtil::CompareNoCase(left->GetSortTitle(), right->GetSortTitle()); + if (res != 0) + return (res < 0); + + // Fallback to path compare if titles are the same. + return (left->path < right->path); } bool GameListModel::lessThan(const QModelIndex& left_index, const QModelIndex& right_index, int column) const