diff --git a/Test/TestBullet3OpenCL/main.cpp b/Test/TestBullet3OpenCL/main.cpp index c5ca8ccb9..f74b9d215 100644 --- a/Test/TestBullet3OpenCL/main.cpp +++ b/Test/TestBullet3OpenCL/main.cpp @@ -3,16 +3,32 @@ #include "Bullet3Common/b3Logging.h" -void myerrorwarningprintf(const char* msg) + +void myerrorprintf(const char* msg) { - //OutputDebugStringA(msg); printf(msg); } + +static bool sVerboseWarning = false; + +void mywarningprintf(const char* msg) +{ + if (sVerboseWarning) + { + //OutputDebugStringA(msg); + printf(msg); + } +} + +static bool sVerbosePrintf=false; void myprintf(const char* msg) { - //OutputDebugStringA(msg); - //printf(msg); + if (sVerbosePrintf) + { + //OutputDebugStringA(msg); + printf(msg); + } } int gArgc=0; @@ -30,8 +46,8 @@ int main(int argc, char **argv) { gArgv = argv; b3SetCustomPrintfFunc(myprintf); - b3SetCustomWarningMessageFunc(myerrorwarningprintf); - b3SetCustomErrorMessageFunc(myerrorwarningprintf); + b3SetCustomWarningMessageFunc(mywarningprintf); + b3SetCustomErrorMessageFunc(myerrorprintf); return RUN_ALL_TESTS(); } diff --git a/src/Bullet3OpenCL/Initialize/b3OpenCLUtils.cpp b/src/Bullet3OpenCL/Initialize/b3OpenCLUtils.cpp index e9619e776..e409658ca 100644 --- a/src/Bullet3OpenCL/Initialize/b3OpenCLUtils.cpp +++ b/src/Bullet3OpenCL/Initialize/b3OpenCLUtils.cpp @@ -79,21 +79,20 @@ void MyFatalBreakAPPLE( const char * errstr , size_t cb , void * user_data ) { - b3Error("Error: %s\n", errstr); + const char* patloc = strstr(errstr, "Warning"); //find out if it is a warning or error, exit if error if (patloc) { - b3Warning("warning\n"); + b3Warning("Warning: %s\n", errstr); } else { - b3Error("error\n"); + b3Error("Error: %s\n", errstr); b3Assert(0); } - } #ifdef B3_USE_CLEW