Skip to content

Commit 8163071

Browse files
author
in1tiate
committed
if its the same file, dont interrupt playback
1 parent fe00c6b commit 8163071

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

src/aolayer.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -261,19 +261,22 @@ void CharLayer::start_playback(QString p_image)
261261

262262
void AOLayer::start_playback(QString p_image)
263263
{
264+
265+
if (!ao_app->is_continuous_enabled()) {
266+
continuous = false;
267+
force_continuous = true;
268+
}
269+
270+
if ((last_path == p_image) && (!force_continuous))
271+
return;
272+
264273
#ifdef DEBUG_MOVIE
265274
actual_time.restart();
266275
#endif
267276
this->clear();
268277
freeze();
269278
movie_frames.clear();
270279
movie_delays.clear();
271-
272-
if (!ao_app->is_continuous_enabled()) {
273-
continuous = false;
274-
force_continuous = true;
275-
}
276-
277280
QString scaling_override =
278281
ao_app->read_design_ini("scaling", p_image + ".ini");
279282
if (scaling_override != "")
@@ -289,10 +292,6 @@ void AOLayer::start_playback(QString p_image)
289292
m_reader.setFileName(p_image);
290293
if (m_reader.loopCount() == 0)
291294
play_once = true;
292-
if ((last_path == p_image) && (!force_continuous))
293-
continuous = true;
294-
else if ((last_path != p_image) && !force_continuous)
295-
continuous = false;
296295
if (!continuous)
297296
frame = 0;
298297
last_max_frames = max_frames;

0 commit comments

Comments
 (0)