From d023c72256f766cfa6d283c2781b3c90cb00aa8c Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Mon, 15 Jun 2009 10:12:16 +0000 Subject: fixed demo browser so it's ordered and shows all files --- src/game/client/components/menus.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/game/client/components/menus.hpp') diff --git a/src/game/client/components/menus.hpp b/src/game/client/components/menus.hpp index 7523cf8d..3ca3ee43 100644 --- a/src/game/client/components/menus.hpp +++ b/src/game/client/components/menus.hpp @@ -1,4 +1,5 @@ #include +#include #include #include @@ -122,10 +123,11 @@ class MENUS : public COMPONENT { char filename[512]; char name[256]; + + bool operator<(const DEMOITEM &other) { return str_comp(name, other.name) < 0; } }; - DEMOITEM *demos; - int num_demos; + sorted_array demos; void demolist_populate(); static void demolist_count_callback(const char *name, int is_dir, void *user); -- cgit 1.4.1