(svn r313) -Feature/Fix: directories in *nix are now sorted alphabetically in ascending order (Tron).
authordarkvater
Thu, 23 Sep 2004 21:16:23 +0000
changeset 307 d251be6c0d54
parent 306 c44133836566
child 308 1d39f4e3eab1
(svn r313) -Feature/Fix: directories in *nix are now sorted alphabetically in ascending order (Tron).
unix.c
--- a/unix.c	Thu Sep 23 21:14:20 2004 +0000
+++ b/unix.c	Thu Sep 23 21:16:23 2004 +0000
@@ -100,6 +100,14 @@
 		closedir(dir);
 	}
 
+	{
+		/* XXX ugly global variables ... */
+		byte order = _savegame_sort_order;
+		_savegame_sort_order = 2; // sort ascending by name
+		qsort(_fios_items, _fios_count, sizeof(FiosItem), compare_FiosItems);
+		_savegame_sort_order = order;
+	}
+
 	// this is where to start sorting
 	sort_start = _fios_count;