Emit mspack debug messages to Xenia.

This commit is contained in:
gibbed 2018-11-24 20:50:30 -06:00
parent 08fb15fcca
commit 7f4f90b1ea
3 changed files with 20 additions and 2 deletions

View File

@ -2,8 +2,10 @@ group("third_party")
project("mspack")
uuid("0881692A-75A1-4E7B-87D8-BB9108CEDEA4")
kind("StaticLib")
language("C")
language("C++")
links({
"xenia-base",
})
defines({
"_LIB",
"HAVE_CONFIG_H",
@ -16,6 +18,7 @@ project("mspack")
"mspack",
})
files({
"mspack/logging.cc",
"mspack/lzx.h",
"mspack/lzxd.c",
"mspack/mspack.h",

10
third_party/mspack/logging.cc vendored Normal file
View File

@ -0,0 +1,10 @@
#include "xenia/base/logging.h"
extern "C" void xenia_log(const char* fmt, ...) {
char buffer[128];
va_list args;
va_start(args, fmt);
vsnprintf(buffer, sizeof(buffer), fmt, args);
va_end(args);
XELOGW("mspack: %s", buffer);
}

View File

@ -15,6 +15,11 @@
#include <system.h>
#include <lzx.h>
extern void xenia_log(const char*, ...);
#undef D
#define D(x) do { xenia_log x; } while (0);
/* Microsoft's LZX document (in cab-sdk.exe) and their implementation
* of the com.ms.util.cab Java package do not concur.
*