12#include <sdcard/wiisd_io.h>
14#include <ogc/usbstorage.h>
17#include "WiiFileSystemDriver.h"
18#include "WiiUsbMulti.h"
20static DISC_INTERFACE * GetDiscSd() {
return &__io_wiisd; }
21static DISC_INTERFACE * GetDiscUsb1() {
return WiiUsbMulti::getInterface(0); }
22static DISC_INTERFACE * GetDiscUsb2() {
return WiiUsbMulti::getInterface(1); }
23static DISC_INTERFACE * GetDiscUsb3() {
return WiiUsbMulti::getInterface(2); }
27 { DEVICE_SD, GetDiscSd,
"sd",
"sd:/",
"SD Card",
"SD card not found!",
true,
true,
true },
28 { DEVICE_USB, GetDiscUsb1,
"usb",
"usb:/",
"USB Mass Storage",
"USB drive not found!",
true,
true,
true },
29 { DEVICE_USB2, GetDiscUsb2,
"usb2",
"usb2:/",
"USB Mass Storage 2",
"USB drive 2 not found!",
true,
true,
true },
30 { DEVICE_USB3, GetDiscUsb3,
"usb3",
"usb3:/",
"USB Mass Storage 3",
"USB drive 3 not found!",
true,
true,
true },
37 USBStorage_Initialize();
42 fatSlotCount =
sizeof(wiiFatSlots) /
sizeof(wiiFatSlots[0]);
53 WiiUsbMulti::shutdown();
54 USBStorage_Deinitialize();
64 return WiiUsbMulti::scan();
70 if(deviceId == DEVICE_USB || deviceId == DEVICE_USB2 || deviceId == DEVICE_USB3)
76 static const int devices[] = { DEVICE_AUTO, DEVICE_SD, DEVICE_USB, DEVICE_USB2, DEVICE_USB3, DEVICE_DVD, DEVICE_SMB };
77 outCount =
sizeof(devices) /
sizeof(devices[0]);
83 static const int devices[] = { DEVICE_AUTO, DEVICE_SD, DEVICE_USB, DEVICE_USB2, DEVICE_USB3, DEVICE_SMB };
84 outCount =
sizeof(devices) /
sizeof(devices[0]);
const OgcFatSlotDescriptor * fatSlots
Table of FAT slots this platform supports; set by the concrete driver.
void initFatSlotsAndAutoMount()
Runs the shared boot-time pass: probe every pollable fatSlots[] entry once for isPresentCache,...
const char * unsupportedFormatMessage
Text returned by mountResultMessage() when a present device fails to mount.
int fatSlotCount
Number of entries in fatSlots.
DISC_INTERFACE * dvdDisc
Disc interface used to mount the DVD drive, or nullptr if the platform has none.
OgcSmbDriver smbDriver
The network-share driver returned by getSmb()
void shutdownPlatform() override
Platform-specific extra teardown beyond the shared per-slot fatUnmount() pass (eg.
void prepareMount(int deviceId) override
Platform-specific work that must run immediately before a user-initiated mount attempt on deviceId,...
const int * getValidSaveDevices(int &outCount) const override
Devices (Device enum values, in priority order) that are offered when choosing where to save to on th...
void init() override
Initializes the driver and auto-mounts devices flagged autoMountAtStartup.
const int * getValidLoadDevices(int &outCount) const override
Devices (Device enum values, in priority order) that are offered when choosing where to load from on ...
bool pollPlatformExtra() override
Platform-specific extra polling that must run before the shared per-slot presence check (eg.
One hot-pluggable FAT-formatted slot, shared shape between GameCube (SD Gecko A/B/port2,...