#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <ogcsys.h>
#include <gccore.h>
#include <stdarg.h>

#include "debugprintf.h"

void debug_printf(const char *fmt, ...)
{
#ifdef GEKKO_DEBUG
/*
	char buf[128];
	int len;
	va_list ap;
	static char usbgecko_connected;
	static char usbgecko_checked;

	va_start(ap, fmt);
	vsnprintf(buf, sizeof(buf), fmt, ap);
	va_end(ap);

	if (!usbgecko_checked) {
		usbgecko_connected = usb_isgeckoalive(GEKKO_CHANNEL);
		usbgecko_checked = 1;
		usb_flush(GEKKO_CHANNEL);
	}
	if (usbgecko_connected) {
		len = strnlen(buf, sizeof(buf));
		usb_sendbuffer_safe(GEKKO_CHANNEL, buf, len);
	}
*/	
#endif
}
