diff --git a/desmume/src/gfx3d.cpp b/desmume/src/gfx3d.cpp index 5981adbc8..924a77773 100644 --- a/desmume/src/gfx3d.cpp +++ b/desmume/src/gfx3d.cpp @@ -1405,21 +1405,21 @@ void gfx3d_glFlush(u32 v) gfx3d_doFlush(); } -static bool gfx3d_ysort_compare(int num1, int num2) +static int gfx3d_ysort_compare(int num1, int num2) { const POLY &poly1 = polylist->list[num1]; const POLY &poly2 = polylist->list[num2]; if(poly1.maxy > poly2.maxy) - return true; + return 1; else if(poly1.maxy < poly2.maxy) - return false; + return -1; else if(poly1.miny < poly2.miny) - return true; + return 1; else if(poly1.miny > poly2.miny) - return false; + return -1; else - return false; //equal should always return false "strict weak ordering" + return 0; //equal should always return false "strict weak ordering" } static void gfx3d_doFlush()