citra_qt: Add simple video dumping error reporting

This is just a simple message that tells the user to refer to the log
This commit is contained in:
zhupengfei 2020-02-01 22:17:08 +08:00
parent 71c64c2617
commit 0a4be71913
No known key found for this signature in database
GPG Key ID: DD129E108BD09378

View File

@ -980,8 +980,14 @@ void GMainWindow::BootGame(const QString& filename) {
if (video_dumping_on_start) { if (video_dumping_on_start) {
Layout::FramebufferLayout layout{ Layout::FramebufferLayout layout{
Layout::FrameLayoutFromResolutionScale(VideoCore::GetResolutionScaleFactor())}; Layout::FrameLayoutFromResolutionScale(VideoCore::GetResolutionScaleFactor())};
Core::System::GetInstance().VideoDumper().StartDumping(video_dumping_path.toStdString(), if (!Core::System::GetInstance().VideoDumper().StartDumping(
layout); video_dumping_path.toStdString(), layout)) {
QMessageBox::critical(
this, tr("Citra"),
tr("Could not start video dumping.<br>Refer to the log for details."));
ui.action_Dump_Video->setChecked(false);
}
video_dumping_on_start = false; video_dumping_on_start = false;
video_dumping_path.clear(); video_dumping_path.clear();
} }
@ -1821,7 +1827,12 @@ void GMainWindow::OnStartVideoDumping() {
if (emulation_running) { if (emulation_running) {
Layout::FramebufferLayout layout{ Layout::FramebufferLayout layout{
Layout::FrameLayoutFromResolutionScale(VideoCore::GetResolutionScaleFactor())}; Layout::FrameLayoutFromResolutionScale(VideoCore::GetResolutionScaleFactor())};
Core::System::GetInstance().VideoDumper().StartDumping(path.toStdString(), layout); if (!Core::System::GetInstance().VideoDumper().StartDumping(path.toStdString(), layout)) {
QMessageBox::critical(
this, tr("Citra"),
tr("Could not start video dumping.<br>Refer to the log for details."));
ui.action_Dump_Video->setChecked(false);
}
} else { } else {
video_dumping_on_start = true; video_dumping_on_start = true;
video_dumping_path = path; video_dumping_path = path;