usbloadergx/source/gecko.c
r-win 8a4e192022 - Reverted to 921
- Removed no disc in drive patch
- DoGameHooks should be called always
2010-05-29 07:38:54 +00:00

42 lines
635 B
C

#include <gccore.h>
#include <stdio.h>
#include <string.h>
/* init-globals */
bool geckoinit = false;
bool textVideoInit = false;
#ifndef NO_DEBUG
#include <stdarg.h>
//using the gprintf from crediar because it is smaller than mine
void gprintf( const char *str, ... )
{
if (!(geckoinit))return;
char astr[4096];
va_list ap;
va_start(ap,str);
vsprintf( astr, str, ap );
va_end(ap);
usb_sendbuffer_safe( 1, astr, strlen(astr) );
}
bool InitGecko()
{
u32 geckoattached = usb_isgeckoalive(EXI_CHANNEL_1);
if (geckoattached)
{
usb_flush(EXI_CHANNEL_1);
return true;
}
else return false;
}
#endif /* NO_DEBUG */