mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-04 05:51:19 +12:00
Fix some issues with building on macOS (#268)
* fixed building on macos, needs OBJC and OBJXX to be enabled * changed to weak ordering due to string comparison not being strong ordering * Use raw PNG bytes from "resource/embedded/resources.h" in all windows too
This commit is contained in:
parent
12b6830546
commit
867c0c5ca2
5 changed files with 20 additions and 21 deletions
|
@ -302,12 +302,12 @@ void wxGameList::UpdateItemColors(sint32 startIndex)
|
|||
}
|
||||
}
|
||||
|
||||
static inline int strongorder_to_int(const std::strong_ordering &wo)
|
||||
static inline int order_to_int(const std::weak_ordering &wo)
|
||||
{
|
||||
// no easy conversion seems to exists in C++20
|
||||
if (wo < 0)
|
||||
if (wo == std::weak_ordering::less)
|
||||
return -1;
|
||||
else if (wo > 0)
|
||||
else if (wo == std::weak_ordering::greater)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -320,9 +320,9 @@ int wxGameList::SortComparator(uint64 titleId1, uint64 titleId2, SortData* sortD
|
|||
const auto& name2 = GetNameByTitleId(titleId2);
|
||||
|
||||
if(sortData->dir > 0)
|
||||
return strongorder_to_int(std::tie(isFavoriteB, name1) <=> std::tie(isFavoriteA, name2));
|
||||
return order_to_int(std::tie(isFavoriteB, name1) <=> std::tie(isFavoriteA, name2));
|
||||
else
|
||||
return strongorder_to_int(std::tie(isFavoriteB, name2) <=> std::tie(isFavoriteA, name1));
|
||||
return order_to_int(std::tie(isFavoriteB, name2) <=> std::tie(isFavoriteA, name1));
|
||||
}
|
||||
|
||||
int wxGameList::SortFunction(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue