2017-10-12 19:23:59 -04:00
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <libdragon.h>
|
|
|
|
#include "types.h"
|
|
|
|
#include "debug.h"
|
|
|
|
#include "menu.h"
|
|
|
|
|
|
|
|
void dbg_printf(display_context_t disp, const char *fmt, ...)
|
|
|
|
{
|
2017-10-25 05:40:17 -04:00
|
|
|
char buf[256] = {0};
|
2017-10-12 19:23:59 -04:00
|
|
|
setbuf(stderr, buf);
|
|
|
|
|
|
|
|
va_list args;
|
|
|
|
va_start(args, fmt);
|
|
|
|
vfprintf(stderr, fmt, args);
|
|
|
|
va_end(args);
|
|
|
|
|
2017-10-25 05:40:17 -04:00
|
|
|
u8 tmp[256] = {0};
|
2017-10-12 19:23:59 -04:00
|
|
|
sprintf(tmp, "%s", buf);
|
|
|
|
printText(tmp, 3, -1, disp);
|
2017-10-25 05:40:17 -04:00
|
|
|
display_show(disp);
|
2017-10-25 15:55:07 -04:00
|
|
|
sleep(5000);
|
2017-10-12 19:23:59 -04:00
|
|
|
}
|