fix(region): fix incorrect ordering in SC flavor of SRgnGetRectsf

This commit is contained in:
Adam Heinermann 2025-10-02 23:12:23 -07:00 committed by fallenoak
parent 02287ba3b4
commit df14314ea1
2 changed files with 14 additions and 22 deletions

View file

@ -453,7 +453,11 @@ int SortRectCallback(const void* elem1, const void* elem2) {
const RECTF* rct1 = static_cast<const RECTF*>(elem1);
const RECTF* rct2 = static_cast<const RECTF*>(elem2);
#if defined(WHOA_RECT_USES_SCREEN_COORDINATES)
double result = rct1->bottom == rct2->bottom ? rct1->left - rct2->left : rct1->bottom - rct2->bottom;
#else
double result = rct1->top == rct2->top ? rct1->left - rct2->left : rct1->top - rct2->top;
#endif
if (result > 0.0) {
return 1;