From 39e39ee597b9e98f9cb6d423644575dc3176b7e3 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 21 Dec 2013 12:03:25 +1100 Subject: [PATCH] Move subdirectories to the top of the list --- qcsrc/menu/xonotic/demolist.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qcsrc/menu/xonotic/demolist.c b/qcsrc/menu/xonotic/demolist.c index 3e3563fe7..1b3b5c140 100644 --- a/qcsrc/menu/xonotic/demolist.c +++ b/qcsrc/menu/xonotic/demolist.c @@ -74,7 +74,10 @@ void getDemos_for_ext(entity me, string ext, float subdir) { n = search_getsize(list); for(i = 0; i < n; ++i) - bufstr_add(me.listDemo, search_getfilename(list, i), TRUE); + { + if(subdir) { bufstr_add(me.listDemo, sprintf("\{3}%s", search_getfilename(list, i)), TRUE); } + else { bufstr_add(me.listDemo, search_getfilename(list, i), TRUE); } + } search_end(list); } -- 2.39.2