HostInterface: Add debugger message callbacks

This commit is contained in:
Connor McLaughlin
2020-12-17 01:17:26 +10:00
parent fa0f177e51
commit a8af0f7ecb
4 changed files with 27 additions and 1 deletions

View File

@ -166,7 +166,12 @@ void HostInterface::ReportError(const char* message)
void HostInterface::ReportMessage(const char* message)
{
Log_InfoPrintf(message);
Log_InfoPrint(message);
}
void HostInterface::ReportDebuggerMessage(const char* message)
{
Log_InfoPrintf("(Debugger) %s", message);
}
bool HostInterface::ConfirmMessage(const char* message)
@ -195,6 +200,16 @@ void HostInterface::ReportFormattedMessage(const char* format, ...)
ReportMessage(message.c_str());
}
void HostInterface::ReportFormattedDebuggerMessage(const char* format, ...)
{
std::va_list ap;
va_start(ap, format);
std::string message = StringUtil::StdStringFromFormatV(format, ap);
va_end(ap);
ReportDebuggerMessage(message.c_str());
}
bool HostInterface::ConfirmFormattedMessage(const char* format, ...)
{
std::va_list ap;