mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-23 11:29:53 +00:00
TitleManager: Fix crash when sorting by format (#1113)
This commit is contained in:
parent
d9e8ca2c83
commit
f69fddc6e5
@ -1143,7 +1143,7 @@ bool wxTitleManagerList::SortFunc(int column, const Type_t& v1, const Type_t& v2
|
||||
// check column: title id -> type -> path
|
||||
if (column == ColumnTitleId)
|
||||
{
|
||||
// ensure strong ordering -> use type since only one entry should be now (should be changed if every save for every user is displayed spearately?)
|
||||
// ensure strong ordering -> use type since only one entry should be now (should be changed if every save for every user is displayed separately?)
|
||||
if (entry1.title_id == entry2.title_id)
|
||||
return SortFunc(ColumnType, v1, v2);
|
||||
|
||||
@ -1159,7 +1159,7 @@ bool wxTitleManagerList::SortFunc(int column, const Type_t& v1, const Type_t& v2
|
||||
}
|
||||
else if (column == ColumnType)
|
||||
{
|
||||
if(std::underlying_type_t<EntryType>(entry1.type) == std::underlying_type_t<EntryType>(entry2.type))
|
||||
if(entry1.type == entry2.type)
|
||||
return SortFunc(-1, v1, v2);
|
||||
|
||||
return std::underlying_type_t<EntryType>(entry1.type) < std::underlying_type_t<EntryType>(entry2.type);
|
||||
@ -1178,6 +1178,13 @@ bool wxTitleManagerList::SortFunc(int column, const Type_t& v1, const Type_t& v2
|
||||
|
||||
return std::underlying_type_t<EntryType>(entry1.region) < std::underlying_type_t<EntryType>(entry2.region);
|
||||
}
|
||||
else if (column == ColumnFormat)
|
||||
{
|
||||
if(entry1.format == entry2.format)
|
||||
return SortFunc(ColumnType, v1, v2);
|
||||
|
||||
return std::underlying_type_t<EntryType>(entry1.format) < std::underlying_type_t<EntryType>(entry2.format);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user