From 4c64e4879f56f720923186fe2838f27292f5a171 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 4 Mar 2025 14:07:10 +1000 Subject: [PATCH] Mini: Log fatal errors to stderr --- src/duckstation-mini/mini_host.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/duckstation-mini/mini_host.cpp b/src/duckstation-mini/mini_host.cpp index 087d84f7e..f376772dd 100644 --- a/src/duckstation-mini/mini_host.cpp +++ b/src/duckstation-mini/mini_host.cpp @@ -1277,11 +1277,14 @@ void Host::RequestSystemShutdown(bool allow_confirm, bool save_state) void Host::ReportFatalError(std::string_view title, std::string_view message) { + // Depending on the platform, this may not be available. + std::fputs(SmallString::from_format("Fatal error: {}: {}\n", title, message).c_str(), stderr); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, TinyString(title).c_str(), SmallString(message).c_str(), nullptr); } void Host::ReportErrorAsync(std::string_view title, std::string_view message) { + std::fputs(SmallString::from_format("Error: {}: {}\n", title, message).c_str(), stderr); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, TinyString(title).c_str(), SmallString(message).c_str(), nullptr); }