瀏覽代碼

Keep the projector on while GAMES is active (and motion exists)

Zachary Kotlarek 10 年之前
父節點
當前提交
713b6acc2e
共有 1 個文件被更改,包括 6 次插入 和 1 次删除
  1. 6 1
      dmx/projectorPower.pl

+ 6 - 1
dmx/projectorPower.pl

@@ -125,8 +125,13 @@ while (1) {
 	if ($exists{'PLAYING'} && $lastUser < $now) {
 		$lastUser = $now;
 	}
+
+	# Motion counts as activity when GAME is active
+	if ($exists{'GAME'} && $mtime{'MOTION'} > $lastUser) {
+		$lastUser = $mtime{'MOTION'};
+	}
 	
-	# Motion counts as activity when Plex is not foreground
+	# Motion counts as activity when PLEX is not active
 	if (!$exists{'PLEX'} && $mtime{'MOTION'} > $lastUser) {
 		$lastUser = $mtime{'MOTION'};
 	}