瀏覽代碼

UI: Change multiview non-studio selection color

When not in studio mode the preview and program sources are the same
but the checks will be made against GetCurrentSceneSource which were
resulting in the multiview source highlight to give the previewColor
where in this case we want the programColor.
Shaolin 7 年之前
父節點
當前提交
1b357d3b12
共有 1 個文件被更改,包括 11 次插入9 次删除
  1. 11 9
      UI/window-projector.cpp

+ 11 - 9
UI/window-projector.cpp

@@ -455,15 +455,17 @@ void OBSProjector::OBSRenderMultiview(void *data, uint32_t cx, uint32_t cy)
 
 		/* ----------- */
 
-		if (src == previewSrc || src == programSrc) {
-			uint32_t colorVal = src == programSrc ? programColor
-					: previewColor;
-
-			gs_matrix_push();
-			gs_matrix_translate3f(sourceX, sourceY, 0.0f);
-			drawBox(quarterCX, quarterCY, colorVal);
-			gs_matrix_pop();
-		}
+		uint32_t colorVal = outerColor;
+		if (src == programSrc)
+			colorVal = programColor;
+		else if (src == previewSrc)
+			colorVal = studioMode ? previewColor : programColor;
+
+		// Highlight preview/program sources with a proper color
+		gs_matrix_push();
+		gs_matrix_translate3f(sourceX, sourceY, 0.0f);
+		drawBox(quarterCX, quarterCY, colorVal);
+		gs_matrix_pop();
 
 		// Change the background back of the source region
 		gs_matrix_push();