mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 15:45:42 +00:00
Host: Purge C format string error overloads
This commit is contained in:
parent
00ccea84b8
commit
ca2a8f1e1f
|
@ -1266,7 +1266,7 @@ void EmuThread::changeDiscFromPlaylist(quint32 index)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!System::SwitchMediaSubImage(index))
|
if (!System::SwitchMediaSubImage(index))
|
||||||
Host::ReportFormattedErrorAsync("Error", "Failed to switch to subimage %u", index);
|
errorReported(tr("Error"), tr("Failed to switch to subimage %1").arg(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmuThread::setCheatEnabled(quint32 index, bool enabled)
|
void EmuThread::setCheatEnabled(quint32 index, bool enabled)
|
||||||
|
|
|
@ -125,22 +125,3 @@ void Host::ClearTranslationCache()
|
||||||
s_translation_string_cache_pos = 0;
|
s_translation_string_cache_pos = 0;
|
||||||
s_translation_string_mutex.unlock();
|
s_translation_string_mutex.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Host::ReportFormattedErrorAsync(std::string_view title, const char* format, ...)
|
|
||||||
{
|
|
||||||
std::va_list ap;
|
|
||||||
va_start(ap, format);
|
|
||||||
std::string message(StringUtil::StdStringFromFormatV(format, ap));
|
|
||||||
va_end(ap);
|
|
||||||
ReportErrorAsync(title, message);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Host::ConfirmFormattedMessage(std::string_view title, const char* format, ...)
|
|
||||||
{
|
|
||||||
std::va_list ap;
|
|
||||||
va_start(ap, format);
|
|
||||||
std::string message = StringUtil::StdStringFromFormatV(format, ap);
|
|
||||||
va_end(ap);
|
|
||||||
|
|
||||||
return ConfirmMessage(title, message);
|
|
||||||
}
|
|
||||||
|
|
|
@ -31,11 +31,9 @@ void ReportFatalError(std::string_view title, std::string_view message);
|
||||||
|
|
||||||
/// Displays an asynchronous error on the UI thread, i.e. doesn't block the caller.
|
/// Displays an asynchronous error on the UI thread, i.e. doesn't block the caller.
|
||||||
void ReportErrorAsync(std::string_view title, std::string_view message);
|
void ReportErrorAsync(std::string_view title, std::string_view message);
|
||||||
void ReportFormattedErrorAsync(std::string_view title, const char* format, ...);
|
|
||||||
|
|
||||||
/// Displays a synchronous confirmation on the UI thread, i.e. blocks the caller.
|
/// Displays a synchronous confirmation on the UI thread, i.e. blocks the caller.
|
||||||
bool ConfirmMessage(std::string_view title, std::string_view message);
|
bool ConfirmMessage(std::string_view title, std::string_view message);
|
||||||
bool ConfirmFormattedMessage(std::string_view title, const char* format, ...);
|
|
||||||
|
|
||||||
/// Returns the user agent to use for HTTP requests.
|
/// Returns the user agent to use for HTTP requests.
|
||||||
std::string GetHTTPUserAgent();
|
std::string GetHTTPUserAgent();
|
||||||
|
|
Loading…
Reference in a new issue