aboutsummaryrefslogtreecommitdiff
path: root/src/aocharmovie.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/aocharmovie.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/aocharmovie.cpp')
-rw-r--r--src/aocharmovie.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/aocharmovie.cpp b/src/aocharmovie.cpp
index 5748723..eacf853 100644
--- a/src/aocharmovie.cpp
+++ b/src/aocharmovie.cpp
@@ -19,16 +19,13 @@ AOCharMovie::AOCharMovie(QWidget *p_parent, AOApplication *p_ao_app) : QLabel(p_
void AOCharMovie::play(QString p_char, QString p_emote, QString emote_prefix)
{
- QString original_path = ao_app->get_character_path(p_char, emote_prefix + p_emote + ".gif");
+ QString original_path = ao_app->get_image_suffix(ao_app->get_character_path(p_char, emote_prefix + p_emote));
QString alt_path = ao_app->get_character_path(p_char, p_emote + ".png");
- QString apng_path = ao_app->get_character_path(p_char, emote_prefix + p_emote + ".apng");
- QString placeholder_path = ao_app->get_theme_path("placeholder.gif");
- QString placeholder_default_path = ao_app->get_default_theme_path("placeholder.gif");
+ QString placeholder_path = ao_app->get_image_suffix(ao_app->get_theme_path("placeholder"));
+ QString placeholder_default_path = ao_app->get_image_suffix(ao_app->get_default_theme_path("placeholder"));
QString gif_path;
- if (file_exists(apng_path))
- gif_path = apng_path;
- else if (file_exists(original_path))
+ if (file_exists(original_path))
gif_path = original_path;
else if (file_exists(alt_path))
gif_path = alt_path;