]> git.lizzy.rs Git - minetest.git/commitdiff
Readd TGA to the list of valid texture formats. (#11598)
authorROllerozxa <temporaryemail4meh+github@gmail.com>
Wed, 15 Sep 2021 10:12:24 +0000 (12:12 +0200)
committerGitHub <noreply@github.com>
Wed, 15 Sep 2021 10:12:24 +0000 (11:12 +0100)
src/client/tile.cpp
src/server.cpp

index 15ae5472d2fab560e5ba90cb25baf2ff60a50a7e..a31e3aca16b4783be167bff6a1cf02088d68fc84 100644 (file)
@@ -81,7 +81,7 @@ static bool replace_ext(std::string &path, const char *ext)
 std::string getImagePath(std::string path)
 {
        // A NULL-ended list of possible image extensions
-       const char *extensions[] = { "png", "jpg", "bmp", NULL };
+       const char *extensions[] = { "png", "jpg", "bmp", "tga", NULL };
        // If there is no extension, assume PNG
        if (removeStringEnd(path, extensions).empty())
                path = path + ".png";
index 8474bc6f1f9e4a275833e68a809d239e7c02e4ec..7fb9a78e966b5833237f82e7000fdba191f7f35b 100644 (file)
@@ -2453,7 +2453,7 @@ bool Server::addMediaFile(const std::string &filename,
        }
        // If name is not in a supported format, ignore it
        const char *supported_ext[] = {
-               ".png", ".jpg", ".bmp",
+               ".png", ".jpg", ".bmp", ".tga",
                ".ogg",
                ".x", ".b3d", ".obj",
                // Custom translation file format