mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-02-04 08:59:07 +00:00
fix(region): fix incorrect ordering in SC flavor of SRgnGetRectsf
This commit is contained in:
parent
02287ba3b4
commit
df14314ea1
2 changed files with 14 additions and 22 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue