input-rec: Display message when we fail to create/open file

This commit is contained in:
TheLastRar authored and Connor McLaughlin committed 2024-06-09 21:03:23 +10:00
1 parent a95288946c
commit 7878dee32d
2 files changed
+18 -1

No files matched your search

+12
View File
@@ -1748,6 +1748,12 @@ void MainWindow::onInputRecNewActionTriggered()
m_ui.actionToolbarReset->setEnabled(!g_InputRecording.isTypeSavestate());
});
}
else
{
Host::ReportErrorAsync(
TRANSLATE_SV("MainWindow", "Input Recording Failed"),
fmt::format(TRANSLATE_FS("MainWindow", "Failed to create file: {}"), filePath));
}
});
}
@@ -1801,6 +1807,12 @@ void MainWindow::onInputRecPlayActionTriggered()
m_ui.actionToolbarReset->setEnabled(!g_InputRecording.isTypeSavestate());
});
}
else
{
Host::ReportErrorAsync(
TRANSLATE_SV("MainWindow", "Input Playback Failed"),
fmt::format(TRANSLATE_FS("MainWindow", "Failed to open file: {}"), filename));
}
});
}
}