Forráskód Böngészése

UI: Add more potential recording errors

jp9000 10 éve
szülő
commit
5ba8333da3
2 módosított fájl, 16 hozzáadás és 1 törlés
  1. 4 0
      obs/data/locale/en-US.ini
  2. 12 1
      obs/window-basic-main.cpp

+ 4 - 0
obs/data/locale/en-US.ini

@@ -74,6 +74,10 @@ Output.ConnectFail.Disconnected="Disconnected from server."
 # output recording-related messages
 Output.RecordFail.Title="Failed to start recording"
 Output.RecordFail.Unsupported="The output format is either unsupported or does not support more than one audio track.  Please check your settings and try again."
+Output.RecordNoSpace.Title="Insufficient disk space"
+Output.RecordNoSpace.Msg="There is not sufficient disk space to continue recording."
+Output.RecordError.Title="Recording error"
+Output.RecordError.Msg="An unspecified error occurred while recording."
 
 # output recording messages
 Output.BadPath.Title="Bad File Path"

+ 12 - 1
obs/window-basic-main.cpp

@@ -3254,11 +3254,22 @@ void OBSBasic::RecordingStop(int code)
 	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,
 				QTStr("Output.RecordFail.Title"),
 				QTStr("Output.RecordFail.Unsupported"));
 
+	} else if (code == OBS_OUTPUT_NO_SPACE) {
+		QMessageBox::information(this,
+				QTStr("Output.RecordNoSpace.Title"),
+				QTStr("Output.RecordNoSpace.Msg"));
+
+	} else if (code != OBS_OUTPUT_SUCCESS) {
+		QMessageBox::information(this,
+				QTStr("Output.RecordError.Title"),
+				QTStr("Output.RecordError.Msg"));
+	}
+
 	if (!outputHandler->Active()) {
 		ui->profileMenu->setEnabled(true);
 	}