mirror of https://github.com/OpenTTD/OpenTTD
Fix: Use natural sort when sorting the file list.
parent
e4414471dd
commit
7bdde8b41d
|
@ -57,7 +57,7 @@ bool FiosItem::operator< (const FiosItem &other) const
|
||||||
if ((_savegame_sort_order & SORT_BY_NAME) == 0 && (*this).mtime != other.mtime) {
|
if ((_savegame_sort_order & SORT_BY_NAME) == 0 && (*this).mtime != other.mtime) {
|
||||||
r = (*this).mtime - other.mtime;
|
r = (*this).mtime - other.mtime;
|
||||||
} else {
|
} else {
|
||||||
r = strcasecmp((*this).title, other.title);
|
r = strnatcmp((*this).title, other.title);
|
||||||
}
|
}
|
||||||
if (r == 0) return false;
|
if (r == 0) return false;
|
||||||
return (_savegame_sort_order & SORT_DESCENDING) ? r > 0 : r < 0;
|
return (_savegame_sort_order & SORT_DESCENDING) ? r > 0 : r < 0;
|
||||||
|
|
Loading…
Reference in New Issue