UI: Add more potential recording errors

This commit is contained in:
jp9000 2015-09-18 22:20:55 -07:00
parent 606a0fc695
commit 5ba8333da3
2 changed files with 16 additions and 1 deletions

View file

@ -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"

View file

@ -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);
}