瀏覽代碼

image-source: Fix slideshow transition bug when randomized

This fixes a bug where the transition wouldn't work when playback
is randomized and restart on activate is used.
Clayton Groeneveld 4 年之前
父節點
當前提交
51050f7181
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      plugins/image-source/obs-slideshow.c

+ 2 - 2
plugins/image-source/obs-slideshow.c

@@ -699,9 +699,9 @@ static void ss_video_tick(void *data, float seconds)
 	if (!ss->transition || !ss->slide_time)
 		return;
 
-	if (ss->restart_on_activate && !ss->randomize && ss->use_cut) {
+	if (ss->restart_on_activate && ss->use_cut) {
 		ss->elapsed = 0.0f;
-		ss->cur_item = 0;
+		ss->cur_item = ss->randomize ? random_file(ss) : 0;
 		do_transition(ss, false);
 		ss->restart_on_activate = false;
 		ss->use_cut = false;