mirror of
https://gitlab.com/Nanolx/homebrewfilter.git
synced 2024-12-01 05:24:21 +01:00
a8337869a3
open the device selection prompt (no unused button left for Game Cube Controller) - press ZR on the Classic Controller or Wii U Pro Controller to open the system selection prompt (no unused button left for Game Cube Controller) [only on Wii] - in partition mounter replace debug_printf with xprintf - disable several DVD and Memory Card related functions in vWii - don't initialize DVD drive on start in vWii builds - allow 'SD Gecko' and 'Wifi Gecko' in parallel
39 lines
596 B
C++
39 lines
596 B
C++
#include "main.h"
|
|
#include "gecko.h"
|
|
#include "Network/wifi_gecko.h"
|
|
|
|
extern "C" void sdprintf(const char * format, ...)
|
|
{
|
|
char * tmp = NULL;
|
|
va_list va;
|
|
va_start(va, format);
|
|
if((vasprintf(&tmp, format, va) >= 0) && tmp)
|
|
{
|
|
FILE * file;
|
|
|
|
file = fopen("sd1:/config/HBF/debug.txt", "a");
|
|
if(file)
|
|
{
|
|
fprintf(file, "%s", tmp);
|
|
fclose(file);
|
|
}
|
|
}
|
|
va_end(va);
|
|
|
|
if(tmp)
|
|
free(tmp);
|
|
}
|
|
|
|
extern "C" void xprintf(const char *str, ...)
|
|
{
|
|
if(Options.sdgecko)
|
|
sdprintf(str);
|
|
|
|
if(Options.wifigecko)
|
|
wifi_printf(str);
|
|
|
|
if(!Options.wifigecko && !Options.sdgecko)
|
|
gprintf(str);
|
|
|
|
}
|