From 0a4be71913883ec835d6af8d753e0101fc6f5fc7 Mon Sep 17 00:00:00 2001 From: zhupengfei Date: Sat, 1 Feb 2020 22:17:08 +0800 Subject: [PATCH] citra_qt: Add simple video dumping error reporting This is just a simple message that tells the user to refer to the log --- src/citra_qt/main.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index fe0ef4f356..323e638a4b 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -980,8 +980,14 @@ void GMainWindow::BootGame(const QString& filename) { if (video_dumping_on_start) { Layout::FramebufferLayout layout{ Layout::FrameLayoutFromResolutionScale(VideoCore::GetResolutionScaleFactor())}; - Core::System::GetInstance().VideoDumper().StartDumping(video_dumping_path.toStdString(), - layout); + if (!Core::System::GetInstance().VideoDumper().StartDumping( + video_dumping_path.toStdString(), layout)) { + + QMessageBox::critical( + this, tr("Citra"), + tr("Could not start video dumping.
Refer to the log for details.")); + ui.action_Dump_Video->setChecked(false); + } video_dumping_on_start = false; video_dumping_path.clear(); } @@ -1821,7 +1827,12 @@ void GMainWindow::OnStartVideoDumping() { if (emulation_running) { Layout::FramebufferLayout layout{ 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.
Refer to the log for details.")); + ui.action_Dump_Video->setChecked(false); + } } else { video_dumping_on_start = true; video_dumping_path = path;