diff options
| author | Crystalwarrior <varsash@gmail.com> | 2019-09-15 02:14:40 +0300 |
|---|---|---|
| committer | Crystalwarrior <varsash@gmail.com> | 2019-09-15 02:14:40 +0300 |
| commit | 37d192b4300efd1c2f3e35b2efb40e93ec99fa03 (patch) | |
| tree | f08e346d791d8a450bd670fecd65645a11a5dcb2 /include | |
| parent | 938f1aeea15c6b68495bb1cb0a80467f4e8cf343 (diff) | |
Load frames as they're needed instead of loading everything at once, and cache them for optimization. The cache is cleared when a new animation is played.
Resolve an issue where if a preanim transitions into (a)idle it would get stuck on the first frame of that (removed the ticker->stop();)
Diffstat (limited to 'include')
| -rw-r--r-- | include/aocharmovie.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/aocharmovie.h b/include/aocharmovie.h index 0921bc5..c852bb3 100644 --- a/include/aocharmovie.h +++ b/include/aocharmovie.h @@ -42,6 +42,7 @@ private: QTimer *preanim_timer; QTimer *ticker; QString last_path; + QImageReader *m_reader = new QImageReader(); QElapsedTimer actual_time; const int time_mod = 60; @@ -51,6 +52,7 @@ private: int y = 0; int frame = 0; + int max_frames = 0; bool m_flipped = false; bool play_once = true; |
