mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Implement logging for at3_standalone
This commit is contained in:
parent
39b884cfb3
commit
70a13a4df5
1 changed files with 24 additions and 2 deletions
|
@ -1,3 +1,25 @@
|
|||
#include "compat.h"
|
||||
#include <cstdarg>
|
||||
#include <cstdio>
|
||||
|
||||
void av_log(int level, const char *fmt, ...) {}
|
||||
#include "compat.h"
|
||||
#include "Common/Log.h"
|
||||
|
||||
void av_log(int level, const char *fmt, ...) {
|
||||
char buffer[512];
|
||||
va_list vl;
|
||||
va_start(vl, fmt);
|
||||
size_t retval = vsnprintf(buffer, sizeof(buffer), fmt, vl);
|
||||
va_end(vl);
|
||||
|
||||
// lazy
|
||||
switch (level) {
|
||||
case AV_LOG_DEBUG:
|
||||
case AV_LOG_TRACE:
|
||||
case AV_LOG_VERBOSE: DEBUG_LOG(ME, "Atrac3/3+: %s", buffer); break;
|
||||
case AV_LOG_ERROR: ERROR_LOG(ME, "Atrac3/3+: %s", buffer); break;
|
||||
case AV_LOG_INFO: INFO_LOG(ME, "Atrac3/3+: %s", buffer); break;
|
||||
case AV_LOG_WARNING:
|
||||
default:
|
||||
WARN_LOG(ME, "Atrac3/3+: %s", buffer); break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue