mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-12-23 00:01:49 +01:00
wiiu: keep asserts in master builds
This commit is contained in:
parent
b6c01f839f
commit
15eafe7642
@ -367,6 +367,9 @@ void re3_usererror(const char *format, ...);
|
||||
#define DEV(f, ...) re3_debug("[DEV]: " f, ## __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#define __FILENAME_X__ (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)
|
||||
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILENAME_X__)
|
||||
|
||||
#ifdef __MWERKS__
|
||||
void debug(char *f, ...);
|
||||
void Error(char *f, ...);
|
||||
@ -376,7 +379,7 @@ __inline__ void TRACE(char *f, ...) { } // this is re3 only, and so the function
|
||||
#define debug(f, ...) re3_debug("[DBG]: " f, ## __VA_ARGS__)
|
||||
#define Error(f, ...) re3_debug("[ERROR]: " f, ## __VA_ARGS__)
|
||||
#ifndef MASTER
|
||||
#define TRACE(f, ...) re3_trace(__FILE__, __LINE__, __FUNCTION__, f, ## __VA_ARGS__)
|
||||
#define TRACE(f, ...) re3_trace(__FILENAME__, __LINE__, __FUNCTION__, f, ## __VA_ARGS__)
|
||||
#define USERERROR(f, ...) re3_usererror(f, ## __VA_ARGS__)
|
||||
#else
|
||||
#define TRACE(f, ...)
|
||||
@ -385,8 +388,8 @@ __inline__ void TRACE(char *f, ...) { } // this is re3 only, and so the function
|
||||
#endif
|
||||
|
||||
#undef assert
|
||||
#ifndef MASTER
|
||||
#define assert(_Expression) (void)( (!!(_Expression)) || (re3_assert(#_Expression, __FILE__, __LINE__, __FUNCTION__), 0) )
|
||||
#if !defined(MASTER) || defined(__WIIU__)
|
||||
#define assert(_Expression) (void)( (!!(_Expression)) || (re3_assert(#_Expression, __FILENAME__, __LINE__, __FUNCTION__), 0) )
|
||||
#else
|
||||
#define assert(_Expression)
|
||||
#endif
|
||||
|
@ -156,7 +156,7 @@ enum Config {
|
||||
|
||||
// This is enabled for all released games except mobile
|
||||
// any debug stuff that is only left in mobile, is not in MASTER
|
||||
//#define MASTER
|
||||
#define MASTER
|
||||
|
||||
// once and for all:
|
||||
// pc: FINAL & MASTER
|
||||
|
@ -984,7 +984,7 @@ const int re3_buffsize = 1024;
|
||||
static char re3_buff[re3_buffsize];
|
||||
#endif
|
||||
|
||||
#ifndef MASTER
|
||||
#if !defined(MASTER) || defined(__WIIU__)
|
||||
void re3_assert(const char *expr, const char *filename, unsigned int lineno, const char *func)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
@ -1034,7 +1034,10 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
|
||||
abort();
|
||||
#elif __WIIU__
|
||||
WHBLogPrintf("\nRE3 ASSERT FAILED\n\tFile: %s\n\tLine: %d\n\tFunction: %s\n\tExpression: %s\n",filename,lineno,func,expr);
|
||||
OSFatal("RE3 ASSERT FAILED");
|
||||
|
||||
char buf[2048];
|
||||
sprintf(buf, "RE3 ASSERT FAILED\nFile: %s\nLine: %d\nFunction: %s\nExpression: %s\n",filename,lineno,func,expr);
|
||||
OSFatal(buf);
|
||||
#else
|
||||
// TODO
|
||||
printf("\nRE3 ASSERT FAILED\n\tFile: %s\n\tLine: %d\n\tFunction: %s\n\tExpression: %s\n",filename,lineno,func,expr);
|
||||
|
Loading…
Reference in New Issue
Block a user