From e00df941fafcee05037a08f8cbb2d96b954d19d0 Mon Sep 17 00:00:00 2001 From: smatz Date: Mon, 16 Jun 2008 19:38:41 +0000 Subject: (svn r13537) -Fix [FS#2090](r13523): QSortT won't work this way, use Dimension instead of uint16[2] for resolutions --- src/gfx.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gfx.cpp') diff --git a/src/gfx.cpp b/src/gfx.cpp index 9f7f4150b..b1e7517bf 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -1313,14 +1313,14 @@ bool ToggleFullScreen(bool fs) return result; } -static int CDECL compare_res(const uint16 *pa, const uint16 *pb) +static int CDECL compare_res(const Dimension *pa, const Dimension *pb) { - int x = pa[0] - pb[0]; + int x = pa->width - pb->width; if (x != 0) return x; - return pa[1] - pb[1]; + return pa->height - pb->height; } void SortResolutions(int count) { - QSortT((uint16*)_resolutions, count, compare_res); + QSortT(_resolutions, count, &compare_res); } -- cgit v1.2.3-70-g09d2