mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 08:05:46 -04:00
HostInterface: Add debugger message callbacks
This commit is contained in:
@ -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;
|
||||
|
@ -62,10 +62,12 @@ public:
|
||||
|
||||
virtual void ReportError(const char* message);
|
||||
virtual void ReportMessage(const char* message);
|
||||
virtual void ReportDebuggerMessage(const char* message);
|
||||
virtual bool ConfirmMessage(const char* message);
|
||||
|
||||
void ReportFormattedError(const char* format, ...);
|
||||
void ReportFormattedMessage(const char* format, ...);
|
||||
void ReportFormattedDebuggerMessage(const char* format, ...);
|
||||
bool ConfirmFormattedMessage(const char* format, ...);
|
||||
|
||||
/// Adds OSD messages, duration is in seconds.
|
||||
|
Reference in New Issue
Block a user