Allow C code to use the Dolphin log manager so that Wiiuse text output

can go to the log window like with other subsystems.

Remove a Wiiuse dependency on libm from when it was a shared library.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5885 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2010-07-16 19:08:26 +00:00
parent 02ce753b76
commit aa998896ac
4 changed files with 46 additions and 14 deletions

View File

@ -24,8 +24,10 @@
#define INFO_LEVEL 4 // General information.
#define DEBUG_LEVEL 5 // Detailed debugging - might make things slow.
#ifdef __cplusplus
namespace LogTypes
{
#endif
enum LOG_TYPE {
ACTIONREPLAY,
@ -84,13 +86,20 @@ enum LOG_LEVELS {
LDEBUG = DEBUG_LEVEL,
};
#ifdef __cplusplus
} // namespace
void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
const char *file, int line, const char *fmt, ...);
extern "C" {
#endif
void GenericLogC(int level, int type,
const char *file, int line, const char *fmt, ...);
#define GenericLog GenericLogC
#ifdef __cplusplus
};
#endif
/*
FIXME:
- Debug_run() - run only in debug time
*/
#if defined LOGGING || defined _DEBUG || defined DEBUGFAST
#define MAX_LOGLEVEL DEBUG_LEVEL
#else
@ -99,9 +108,6 @@ enum LOG_LEVELS {
#endif // loglevel
#endif // logging
void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
const char *file, int line, const char *fmt, ...);
#ifdef GEKKO
#define GENERIC_LOG(t, v, ...)
#else
@ -131,7 +137,6 @@ void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
#define _dbg_update_() Host_UpdateLogDisplay();
#else // not debug
#define _dbg_clear_()
#define _dbg_update_() ;
#ifndef _dbg_assert_