diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2020-05-19 18:49:29 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-19 18:49:29 -0500 |
| commit | 4af7bc5fffd784195385712ab6ddf476d5ae1a2f (patch) | |
| tree | 469446dae8e531da9d4a9b61fdaf011b32a4fa71 | |
| parent | f052a7f2ea2e447910207b44811bab5c5d08c2aa (diff) | |
Fix broken APNG (#153)
* Remove explicit APNG check
* Update aocharmovie.h
| -rw-r--r-- | include/aocharmovie.h | 1 | ||||
| -rw-r--r-- | src/aocharmovie.cpp | 8 |
2 files changed, 2 insertions, 7 deletions
diff --git a/include/aocharmovie.h b/include/aocharmovie.h index 6db490b9..f62820b9 100644 --- a/include/aocharmovie.h +++ b/include/aocharmovie.h @@ -65,7 +65,6 @@ private: bool m_flipped = false; bool play_once = true; - bool apng = false; signals: void done(); diff --git a/src/aocharmovie.cpp b/src/aocharmovie.cpp index 4252923a..35d9b031 100644 --- a/src/aocharmovie.cpp +++ b/src/aocharmovie.cpp @@ -19,8 +19,6 @@ AOCharMovie::AOCharMovie(QWidget *p_parent, AOApplication *p_ao_app) void AOCharMovie::play(QString p_char, QString p_emote, QString emote_prefix) { - apng = false; - QString original_path = ao_app->get_character_path(p_char, emote_prefix + p_emote + ".gif"); QString alt_path = @@ -35,10 +33,8 @@ void AOCharMovie::play(QString p_char, QString p_emote, QString emote_prefix) QString gif_path; current_emote = emote_prefix + p_emote; current_char = p_char; - if (file_exists(apng_path)) { + if (file_exists(apng_path)) gif_path = apng_path; - apng = true; - } else if (file_exists(original_path)) gif_path = original_path; else if (file_exists(alt_path)) @@ -184,7 +180,7 @@ void AOCharMovie::movie_ticker() if (m_movie->frameCount() == 0) { return; } - else if (!apng) { + else { ticker->start(m_movie->nextFrameDelay()); } } |
