コード例 #1
0
bool DeviceHandler::Mount(int dev)
{
	if(dev == SD)
		return MountSD();

	/*else if(dev == GCSDA)
		return MountGCA();

	else if(dev == GCSDB)
		return MountGCB();*/

	else if(dev >= USB1 && dev <= USB10)
		return MountUSB(dev-USB1);

	/*else if(dev >= SMB1 && dev <= SMB10)
		return ConnectSMBShare(dev-SMB1);

	else if(dev >= FTP1 && dev <= FTP10)
		return ConnectFTP(dev-FTP1);

	else if(dev >= NFS1 && dev <= NFS10)
		return ConnectNFS(dev-NFS1);

	else if(dev == NAND)
		return MountNAND();

	else if(dev == DVD)
		return MountDVD();*/

	return false;
}
コード例 #2
0
ファイル: DeviceHandler.cpp プロジェクト: joarley/usbloadergx
int DeviceHandler::MountAllUSB() {
    int count = 0;
    for(int port = 0; port < MAX_USB_STORAGE_DEVICES; port++)
        if(MountUSB(port))
            count++;
    return count;
}
コード例 #3
0
bool DeviceHandler::Mount(int dev)
{
	if(dev == SD)
		return MountSD();

	else if(dev >= USB1 && dev <= USB8)
		return MountUSB(dev-USB1);

	return false;
}
コード例 #4
0
bool DeviceHandler::MountAllUSB()
{
	if(!usb0)
		usb0 = new PartitionHandle((IOS_GetVersion() > 200) ? &__io_usbstorage2_port0 : &__io_usbstorage);
	if(!usb1 && Settings.USBPort == 1 && IOS_GetVersion() > 200)
		usb1 = new PartitionHandle(&__io_usbstorage2_port1);

	bool result = false;
	int partCount = 0;
	if(usb0)
		partCount += usb0->GetPartitionCount();
	if(usb1)
		partCount += usb1->GetPartitionCount();

	for(int i = 0; i < partCount; i++)
	{
		if(MountUSB(i))
			result = true;
	}

	return result;
}
コード例 #5
0
bool DeviceHandler::MountAllUSB()
{
	/* Kill possible USB thread */
	KillUSBKeepAliveThread();
	/* Wait for our slowass HDD */
	WaitForDevice(GetUSBInterface());
	/* Get Partitions and Mount them */
	if(!usb.IsInserted() || !usb.IsMounted(0))
		usb.SetDevice(GetUSBInterface());
	bool result = false;
	int partCount = GetUSBPartitionCount();
	for(int i = 0; i < partCount; i++)
	{
		if(MountUSB(i))
			result = true;
	}
	if(!result)
		result = usb.Mount(0, DeviceName[USB1], true); /* Force FAT */
	if(result && usb_libogc_mode)
		CreateUSBKeepAliveThread();
	return result;
}