diff options
author | smatz <smatz@openttd.org> | 2008-06-16 19:38:41 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-06-16 19:38:41 +0000 |
commit | 2299181c4be2a6d53eec62664c7a51e429c9f8a5 (patch) | |
tree | 9779d4c999b30e1a9c2dbf181c1456b5bb688cfc /src/gfx.cpp | |
parent | 0c342f3292af7dd5f563e5bd053ff01bdcd32582 (diff) | |
download | openttd-2299181c4be2a6d53eec62664c7a51e429c9f8a5.tar.xz |
(svn r13537) -Fix [FS#2090](r13523): QSortT won't work this way, use Dimension instead of uint16[2] for resolutions
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r-- | src/gfx.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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); } |