UI: Report more detailed output errors if available

上级 ca5f1230
......@@ -910,9 +910,15 @@ bool SimpleOutput::StartRecording()
if (!ConfigureRecording(false))
return false;
if (!obs_output_start(fileOutput)) {
QString error_reason;
const char *error = obs_output_get_last_error(fileOutput);
if (error)
error_reason = QT_UTF8(error);
else
error_reason = QTStr("Output.StartFailedGeneric");
QMessageBox::critical(main,
QTStr("Output.StartRecordingFailed"),
QTStr("Output.StartFailedGeneric"));
QTStr("Output.StartRecordingFailed"),
error_reason);
return false;
}
......@@ -1528,9 +1534,15 @@ bool AdvancedOutput::StartRecording()
}
if (!obs_output_start(fileOutput)) {
QString error_reason;
const char *error = obs_output_get_last_error(fileOutput);
if (error)
error_reason = QT_UTF8(error);
else
error_reason = QTStr("Output.StartFailedGeneric");
QMessageBox::critical(main,
QTStr("Output.StartRecordingFailed"),
QTStr("Output.StartFailedGeneric"));
error_reason);
return false;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册