diff options
Diffstat (limited to 'backends/platform/wii/main.cpp')
-rw-r--r-- | backends/platform/wii/main.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/backends/platform/wii/main.cpp b/backends/platform/wii/main.cpp index 3b5ce3762f..3c53039ea2 100644 --- a/backends/platform/wii/main.cpp +++ b/backends/platform/wii/main.cpp @@ -27,12 +27,16 @@ #include <ogc/machine/processor.h> #include <fat.h> -#include "osystem.h" +#ifndef GAMECUBE +#include <di/di.h> +#endif #ifdef DEBUG_WII_GDB #include <debug.h> #endif +#include "osystem.h" + #ifdef __cplusplus extern "C" { #endif @@ -79,6 +83,10 @@ void wii_memstats(void) { int main(int argc, char *argv[]) { s32 res; +#ifndef GAMECUBE + DI_Init(); +#endif + VIDEO_Init(); PAD_Init(); AUDIO_Init(NULL); @@ -102,6 +110,11 @@ int main(int argc, char *argv[]) { SYS_SetPowerCallback(power_cb); #endif +#ifndef GAMECUBE + // initial async mount for the browser, see wii-fs.cpp + DI_Mount(); +#endif + if (!fatInitDefault()) { printf("fatInitDefault failed\n"); } else { @@ -136,6 +149,10 @@ int main(int argc, char *argv[]) { fatUnmountDefault(); #endif +#ifndef GAMECUBE + DI_Close(); +#endif + if (power_btn_pressed) { printf("shutting down\n"); SYS_ResetSystem(SYS_POWEROFF, 0, 0); |