mirror of
https://github.com/OpenTTD/OpenTTD
synced 2025-12-21 12:12:43 +01:00
Fix: Use natural sort when sorting the file list.
This commit is contained in:
committed by
Niels Martin Hansen
parent
fb8f4119f3
commit
acb63cb4d4
@@ -56,7 +56,7 @@ int CDECL CompareFiosItems(const FiosItem *da, const FiosItem *db)
|
|||||||
if ((_savegame_sort_order & SORT_BY_NAME) == 0 && da->mtime != db->mtime) {
|
if ((_savegame_sort_order & SORT_BY_NAME) == 0 && da->mtime != db->mtime) {
|
||||||
r = da->mtime < db->mtime ? -1 : 1;
|
r = da->mtime < db->mtime ? -1 : 1;
|
||||||
} else {
|
} else {
|
||||||
r = strcasecmp(da->title, db->title);
|
r = strnatcmp(da->title, db->title);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_savegame_sort_order & SORT_DESCENDING) r = -r;
|
if (_savegame_sort_order & SORT_DESCENDING) r = -r;
|
||||||
|
|||||||
Reference in New Issue
Block a user