libwhb: Add a simplistic Cafe Log handler

This commit is contained in:
CreeperMario 2017-08-06 17:42:43 +09:30
parent c0c1faa1e9
commit 90d13e5708
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#pragma once
#include <wut.h>
/**
* \defgroup whb_log_cafe Cafe OS System Log Output
* \ingroup whb
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
BOOL
WHBLogCafeInit();
#ifdef __cplusplus
}
#endif
/** @} */

15
src/libwhb/src/log_cafe.c Normal file
View File

@ -0,0 +1,15 @@
#include <coreinit/debug.h>
#include <whb/log.h>
static void
cafeLogHandler(const char * msg)
{
OSReport("%s\n", msg);
}
BOOL
WHBLogCafeInit()
{
WHBAddLogHandler(cafeLogHandler);
return TRUE;
}