mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-06 19:45:33 +00:00
Mini: Log fatal errors to stderr
This commit is contained in:
parent
af4eb68065
commit
4c64e4879f
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user