usbloadergx/source/gecko.c
giantpune 55a401e4a5 lots of changes here
changed gprintf() to use crediar's method because it is smaller and works just the same.

allow r-win's debug printf() stuff to be sent to the gecko to reduce redundant stuff there 

issue 1073.  headless mode - allow game to be booted via argv[1].

took out all the params from the exitprompt since they aren't used.

took out all the #ifdef stuff for building for a wii.  obviously this wont run on a gamecube so it isn't needed.

added a way to check what version of a IOS is installed before trying to boot into it.  added IOS_ReloadIOSsafe(). this should stop idiots with the 4.2 stubs from bitching about why stuff doesn't work.

use that check so you only see the "222v4 is needed" prompt in the settings if you don't already have that installed.

fix issue 1039. (must still be compiled without NO_DEBUG defined because technically WiiRD is a debugger)
2009-12-03 01:06:09 +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 */