| 44 | } |
| 45 | |
| 46 | void Platform::outputDebugString( const char *string, ... ) |
| 47 | { |
| 48 | // Expand string. |
| 49 | |
| 50 | char buffer[ 2048 ]; |
| 51 | |
| 52 | va_list args; |
| 53 | va_start( args, string ); |
| 54 | |
| 55 | dVsprintf( buffer, sizeof( buffer ), string, args ); |
| 56 | va_end( args ); |
| 57 | |
| 58 | // Append a newline to buffer. This is better than calling OutputDebugStringA |
| 59 | // twice as in a multi-threaded environment, some other thread may output some |
| 60 | // stuff in between the two calls. |
| 61 | |
| 62 | U32 length = strlen( buffer ); |
| 63 | if( length == ( sizeof( buffer ) - 1 ) ) |
| 64 | length --; |
| 65 | |
| 66 | buffer[ length ] = '\n'; |
| 67 | buffer[ length + 1 ] = '\0'; |
| 68 | |
| 69 | OutputDebugStringA( buffer ); |
| 70 | } |
| 71 |
nothing calls this directly
no test coverage detected