Browse Source

UI: Fix stream/recording startup/stop logging

I actually made the mistake of making these messages only display if all
outputs were no longer active.
jp9000 10 years ago
parent
commit
a0e42ff277
1 changed files with 6 additions and 11 deletions
  1. 6 11
      obs/window-basic-main.cpp

+ 6 - 11
obs/window-basic-main.cpp

@@ -2920,9 +2920,6 @@ void OBSBasic::StartStreaming()
 {
 {
 	SaveProject();
 	SaveProject();
 
 
-	if (!outputHandler->Active())
-		blog(LOG_INFO, STREAMING_START);
-
 	if (outputHandler->StreamingActive())
 	if (outputHandler->StreamingActive())
 		return;
 		return;
 
 
@@ -2951,6 +2948,7 @@ void OBSBasic::StreamingStart()
 	ui->streamButton->setEnabled(true);
 	ui->streamButton->setEnabled(true);
 	ui->statusbar->StreamStarted(outputHandler->streamOutput);
 	ui->statusbar->StreamStarted(outputHandler->streamOutput);
 	ui->profileMenu->setEnabled(false);
 	ui->profileMenu->setEnabled(false);
+	blog(LOG_INFO, STREAMING_START);
 }
 }
 
 
 void OBSBasic::StreamingStop(int code)
 void OBSBasic::StreamingStop(int code)
@@ -2986,10 +2984,10 @@ void OBSBasic::StreamingStop(int code)
 	ui->streamButton->setText(QTStr("Basic.Main.StartStreaming"));
 	ui->streamButton->setText(QTStr("Basic.Main.StartStreaming"));
 	ui->streamButton->setEnabled(true);
 	ui->streamButton->setEnabled(true);
 
 
-	if (!outputHandler->Active()) {
+	if (!outputHandler->Active())
 		ui->profileMenu->setEnabled(true);
 		ui->profileMenu->setEnabled(true);
-		blog(LOG_INFO, STREAMING_STOP);
-	}
+
+	blog(LOG_INFO, STREAMING_STOP);
 
 
 	if (code != OBS_OUTPUT_SUCCESS)
 	if (code != OBS_OUTPUT_SUCCESS)
 		QMessageBox::information(this,
 		QMessageBox::information(this,
@@ -3001,9 +2999,6 @@ void OBSBasic::StartRecording()
 {
 {
 	SaveProject();
 	SaveProject();
 
 
-	if (!outputHandler->Active())
-		blog(LOG_INFO, RECORDING_START);
-
 	if (!outputHandler->RecordingActive())
 	if (!outputHandler->RecordingActive())
 		outputHandler->StartRecording();
 		outputHandler->StartRecording();
 }
 }
@@ -3017,7 +3012,6 @@ void OBSBasic::StopRecording()
 
 
 	if (!outputHandler->Active()) {
 	if (!outputHandler->Active()) {
 		ui->profileMenu->setEnabled(true);
 		ui->profileMenu->setEnabled(true);
-		blog(LOG_INFO, RECORDING_STOP);
 	}
 	}
 }
 }
 
 
@@ -3026,12 +3020,14 @@ void OBSBasic::RecordingStart()
 	ui->statusbar->RecordingStarted(outputHandler->fileOutput);
 	ui->statusbar->RecordingStarted(outputHandler->fileOutput);
 	ui->recordButton->setText(QTStr("Basic.Main.StopRecording"));
 	ui->recordButton->setText(QTStr("Basic.Main.StopRecording"));
 	ui->profileMenu->setEnabled(false);
 	ui->profileMenu->setEnabled(false);
+	blog(LOG_INFO, RECORDING_START);
 }
 }
 
 
 void OBSBasic::RecordingStop(int code)
 void OBSBasic::RecordingStop(int code)
 {
 {
 	ui->statusbar->RecordingStopped();
 	ui->statusbar->RecordingStopped();
 	ui->recordButton->setText(QTStr("Basic.Main.StartRecording"));
 	ui->recordButton->setText(QTStr("Basic.Main.StartRecording"));
+	blog(LOG_INFO, RECORDING_STOP);
 
 
 	if (code == OBS_OUTPUT_UNSUPPORTED)
 	if (code == OBS_OUTPUT_UNSUPPORTED)
 		QMessageBox::information(this,
 		QMessageBox::information(this,
@@ -3040,7 +3036,6 @@ void OBSBasic::RecordingStop(int code)
 
 
 	if (!outputHandler->Active()) {
 	if (!outputHandler->Active()) {
 		ui->profileMenu->setEnabled(true);
 		ui->profileMenu->setEnabled(true);
-		blog(LOG_INFO, RECORDING_STOP);
 	}
 	}
 }
 }