]> git.lizzy.rs Git - minetest.git/commitdiff
Fix texture pack sorting in content tab (#12727)
authorROllerozxa <temporaryemail4meh+github@gmail.com>
Sat, 10 Sep 2022 10:20:33 +0000 (12:20 +0200)
committerGitHub <noreply@github.com>
Sat, 10 Sep 2022 10:20:33 +0000 (12:20 +0200)
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
builtin/mainmenu/pkgmgr.lua

index 9fa9aebb0675a6d9ab5b574e71bd913184751893..384870ae1b77ab4a85126793a83144fa08668547 100644 (file)
@@ -177,7 +177,7 @@ function pkgmgr.get_texture_packs()
        end
 
        table.sort(retval, function(a, b)
-               return a.name > b.name
+               return a.title:lower() < b.title:lower()
        end)
 
        return retval
@@ -787,6 +787,9 @@ end
 --------------------------------------------------------------------------------
 function pkgmgr.update_gamelist()
        pkgmgr.games = core.get_games()
+       table.sort(pkgmgr.games, function(a, b)
+               return a.title:lower() < b.title:lower()
+       end)
 end
 
 --------------------------------------------------------------------------------