mirror of
https://github.com/opentx/opentx.git
synced 2025-07-15 20:35:17 +03:00
Compilation fix for Visual Studio
This commit is contained in:
parent
5b4d9cd7d7
commit
c907c20705
1 changed files with 6 additions and 5 deletions
|
@ -42,19 +42,20 @@ traceCallbackFunc traceCallback = 0;
|
|||
#endif
|
||||
|
||||
#if defined(SIMU)
|
||||
#define PRINTF_BUFFER_SIZE 1024
|
||||
void debugPrintf(const char * format, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
char * str;
|
||||
char tmp[PRINTF_BUFFER_SIZE];
|
||||
|
||||
va_start(arglist, format);
|
||||
vasprintf(&str, format, arglist);
|
||||
vsnprintf(tmp, PRINTF_BUFFER_SIZE, format, arglist);
|
||||
va_end(arglist);
|
||||
fputs(str, stdout);
|
||||
fputs(tmp, stdout);
|
||||
fflush(stdout);
|
||||
if (traceCallback) {
|
||||
traceCallback(str);
|
||||
traceCallback(tmp);
|
||||
}
|
||||
free(str);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue