6#include "WiiPlatform.h"
13 this->threadDriver->init();
16 this->videoDriver->init(
config.canvasWidth,
config.canvasHeight);
19 this->audioDriver->init();
22 this->inputDriver->init();
25 this->fileSystemDriver->init();
28 this->logger =
new Logger();
30 this->logger->registerBackend(LOGGER_UDP,
new OgcLoggerUdp());
32 this->logger->registerBackend(LOGGER_FILE,
new LoggerFile());
35 static const int deviceCandidates[] = { DEVICE_SD, DEVICE_USB };
37 const char * mountPath = FindFirstMountedPath(this->fileSystemDriver, deviceCandidates, 2);
39 if(mountPath[0] !=
'\0') {
41 snprintf(logConfig.
filePath,
sizeof(logConfig.
filePath),
"%sdebug.log", mountPath);
44 this->logger->init(logConfig);
56 if (fileSystemDriver) {
57 fileSystemDriver->shutdown();
58 delete fileSystemDriver;
59 fileSystemDriver =
nullptr;
63 inputDriver->shutdown();
65 inputDriver =
nullptr;
69 audioDriver->shutdown();
71 audioDriver =
nullptr;
75 videoDriver->shutdown();
77 videoDriver =
nullptr;
81 threadDriver->shutdown();
83 threadDriver =
nullptr;
91static bool hardwarePowerOffRequested =
false;
93void NotifyWiiShutdownRequested() { hardwarePowerOffRequested =
true; platform->triggerExit(); }
105 if(hardwarePowerOffRequested)
106 SYS_ResetSystem(SYS_POWEROFF_STANDBY, 0, FALSE);
116 if(platform->getStatus() == Status::Exiting)
119 static bool wasResetDown =
false;
120 bool isResetDown = SYS_ResetButtonDown();
121 bool justPressed = isResetDown && !wasResetDown;
122 wasResetDown = isResetDown;
127 return SystemEvent::None;
Log backend that appends to a file through the platform's devoptab path.
Central fan-out dispatcher.
GC/Wii AudioDriver: AESND-based fixed voices for one-shots, wraps a GuiSoundOggPlayer for the backgro...
Log backend writing to the console debug output via SYS_Report.
Non-blocking UDP log backend.
Log backend for a USB Gecko adapter over EXI, via usbgecko.c.
GC/Wii ThreadDriver, built on libogc's LWP threading primitives.
GC/Wii VideoDriver: raw GX, double-buffered XFB.
Wii FileSystemDriver: hot-pluggable SD and up to 3 concurrent USB MSD plus DVD (ISO9660) and DEVICE_S...
SystemEvent
A hardware/OS-level system event a Platform can report.
@ ResetRequested
Reset button pressed (Wii only).
@ ShutdownRequested
Power button pressed (console or, on Wii, a Wiimote) - or, on Wii U, the OS asking the app to exit.
Full runtime configuration for the Logger.
char filePath[1024]
Path of the log file for the file backend. Each platform's init() points this at debug....