diff options
author | Max Horn | 2010-08-02 17:12:52 +0000 |
---|---|---|
committer | Max Horn | 2010-08-02 17:12:52 +0000 |
commit | 2f4d2b58de1e4109cb454180b402708146476a8c (patch) | |
tree | 450e3210d01bb519708beb1033e00e9e49f6fd51 /backends | |
parent | 8aae4aaaeef199f65522f94fe906449e3e626e75 (diff) | |
download | scummvm-rg350-2f4d2b58de1e4109cb454180b402708146476a8c.tar.gz scummvm-rg350-2f4d2b58de1e4109cb454180b402708146476a8c.tar.bz2 scummvm-rg350-2f4d2b58de1e4109cb454180b402708146476a8c.zip |
DS: Allow disabling assert via NDEBUG; cleanup
svn-id: r51640
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/ds/arm9/source/portdefs.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/backends/platform/ds/arm9/source/portdefs.h b/backends/platform/ds/arm9/source/portdefs.h index c08f994e8e..cc38d66a73 100644 --- a/backends/platform/ds/arm9/source/portdefs.h +++ b/backends/platform/ds/arm9/source/portdefs.h @@ -52,6 +52,7 @@ #define STREAM_AUDIO_FROM_DISK #endif +// FIXME: What is "NO_DEBUG_MSGS" good for? #define NO_DEBUG_MSGS // This is defined in dsmain.cpp @@ -68,16 +69,22 @@ void consolePrintf(const char *format, ...); #undef assert #endif +#ifdef NDEBUG + +#define assert(e) ((void)0) + +#else + +// FIXME: Shouldn't assert() also bail out / exit / halt the program? Right now we just +// print an error message... #define assert(s) \ do { \ - if (!(s)) \ + if (!(s)) { \ consolePrintf("Assertion failed: '##s##' at file %s, line %d\n", __FILE__, __LINE__); \ + } \ } while (0) -//#include "ds-fs.h" - -//#define debug(fmt, ...) consolePrintf(fmt, ##__VA_ARGS__) -//#define debug(fmt, ...) debug(0, fmt, ##__VA_ARGS__) +#endif // FIXME: Since I can't change the engine at the moment (post lockdown) this define can go here. // This define changes the mouse-relative motion which doesn't make sense on a touch screen to |