aboutsummaryrefslogtreecommitdiff
path: root/src/text_file_functions.cpp
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2019-09-10 21:57:06 +0300
committerCrystalwarrior <varsash@gmail.com>2019-09-10 21:57:06 +0300
commit73782055237ee8948b26935348e8ca2b8a71a95a (patch)
tree23bb2cdb6f994deab925d7337c7a0f94fd54fcf5 /src/text_file_functions.cpp
parent961563daf3af7fd0167b281ed101d11c67a4eaf7 (diff)
Expand .apng and .webp support for get_image_suffix
Add get_image_suffix for all .gif's so that all animated pieces can be .webp or .apng instead Expand on .webp .apng support and clean up the code somewhat
Diffstat (limited to 'src/text_file_functions.cpp')
-rw-r--r--src/text_file_functions.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp
index 5a34ac8b..904e212f 100644
--- a/src/text_file_functions.cpp
+++ b/src/text_file_functions.cpp
@@ -385,11 +385,12 @@ QString AOApplication::get_sfx_suffix(QString sound_to_check)
QString AOApplication::get_image_suffix(QString path_to_check)
{
+ QString webp_check = path_to_check + ".webp";
QString apng_check = path_to_check + ".apng";
+ if (file_exists(webp_check))
+ return webp_check;
if (file_exists(apng_check))
- {
return apng_check;
- }
return path_to_check + ".gif";
}