main: Add fail hint for taking screenshot in Vulkan mode

This commit is contained in:
mercury233
2021-07-26 11:57:09 +08:00
parent c09557acd8
commit dc9c32d136

View File

@@ -2816,6 +2816,13 @@ void GMainWindow::OnToggleFilterBar() {
void GMainWindow::OnCaptureScreenshot() { void GMainWindow::OnCaptureScreenshot() {
OnPauseGame(); OnPauseGame();
if (Settings::values.renderer_backend.GetValue() != Settings::RendererBackend::OpenGL) {
QMessageBox::warning(this, tr("Failed to capture screenshot."),
tr("The screenshot feature is only available in OpenGL mode for now."));
OnStartGame();
return;
}
const u64 title_id = Core::System::GetInstance().CurrentProcess()->GetTitleID(); const u64 title_id = Core::System::GetInstance().CurrentProcess()->GetTitleID();
const auto screenshot_path = const auto screenshot_path =
QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::ScreenshotsDir)); QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::ScreenshotsDir));