aboutsummaryrefslogtreecommitdiff
path: root/src/aolayer.cpp
diff options
context:
space:
mode:
authorin1tiate <radwoodward@vikings.grayson.edu>2021-01-23 12:53:47 -0600
committerin1tiate <radwoodward@vikings.grayson.edu>2021-01-23 12:53:47 -0600
commit9624af54120cd67db38d2ef762498d734507113b (patch)
treed934fde4d4b434c379e1590a442c5a8d9e17477c /src/aolayer.cpp
parentc13e6b7ab0fd36ebf784294b2788ae365109a24f (diff)
fix continuous and make it configurable
Diffstat (limited to 'src/aolayer.cpp')
-rw-r--r--src/aolayer.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/aolayer.cpp b/src/aolayer.cpp
index f95773b0..efa0e447 100644
--- a/src/aolayer.cpp
+++ b/src/aolayer.cpp
@@ -325,6 +325,11 @@ void AOLayer::start_playback(QString p_image)
if (!file_exists(p_image))
return;
+ if (!ao_app->is_continuous_enabled()) {
+ continuous = false;
+ force_continuous = true;
+ }
+
QString scaling_override =
ao_app->read_design_ini("scaling", p_image + ".ini");
if (scaling_override != "")
@@ -351,12 +356,13 @@ void AOLayer::start_playback(QString p_image)
frame = 0;
continuous = false;
}
- // CANTFIX: this causes a slight hitch
+ // CANTFIX: this causes a hitch
// The correct way of doing this would be to use QImageReader::jumpToImage()
// and populate missing data in the movie ticker when it's needed. This is
- // unforunately completely impossible, because QImageReader::jumpToImage() is
+ // unfortunately completely impossible, because QImageReader::jumpToImage() is
// not implemented in any image format AO2 is equipped to use. Instead, the
// default behavior is used - that is, absolutely nothing.
+ // This is why continuous playback can be toggled off.
if (continuous) {
for (int i = frame; i--;) {
if (i <= -1)
@@ -368,6 +374,7 @@ void AOLayer::start_playback(QString p_image)
// qDebug() << "appending delay of " << l_delay;
}
}
+ last_path = p_image;
// qDebug() << "CONT: " << continuous << " MAX: " << max_frames
// << " LAST MAX: " << last_max_frames << " FRAME: " << frame;
QPixmap f_pixmap = this->get_pixmap(m_reader.read());