Explorar el Código

UI: Fix unassigned audio source check in callback

derrod hace 2 años
padre
commit
87e294fa5f
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      UI/volume-control.cpp

+ 2 - 1
UI/volume-control.cpp

@@ -119,7 +119,8 @@ void VolControl::VolumeMuted(bool muted)
 void VolControl::OBSMixersChanged(void *data, calldata_t *calldata)
 {
 	VolControl *volControl = static_cast<VolControl *>(data);
-	bool unassigned = calldata_int(calldata, "mixers") == 0;
+	bool unassigned = (calldata_int(calldata, "mixers") &
+			   ((1 << MAX_AUDIO_MIXES) - 1)) == 0;
 
 	QMetaObject::invokeMethod(volControl, "AssignmentChanged",
 				  Q_ARG(bool, unassigned));