mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-04 18:45:05 +01:00
2ad2c5d1b8
*Fixed Creditscrash (noticed that giantpune can't count lol) *Fixed European Keyboard missplaced *Pimped the Home Menu (sound and stuff and a lot of fixes) *Fixed last compile warning thx to DRayX7 *Added S.Chinese Unicode Fix thx to pc9528
56 lines
991 B
C
56 lines
991 B
C
#include <fat.h>
|
|
#include <ogc/lwp_watchdog.h>
|
|
#include <ogc/mutex.h>
|
|
#include <ogc/usbstorage.h>
|
|
#include <sdcard/wiisd_io.h>
|
|
#include <sys/dir.h>
|
|
|
|
#define CACHE 8
|
|
|
|
|
|
int USBDevice_Init()
|
|
{
|
|
//right now only mounts first partition and only under IOS36
|
|
__io_usbstorage.startup();
|
|
|
|
if (fatMount("USB", &__io_usbstorage, 0, CACHE)) {
|
|
return 1;
|
|
}
|
|
|
|
return -1;
|
|
}
|
|
|
|
void USBDevice_deInit()
|
|
{
|
|
//First unmount all the devs...
|
|
fatUnmount("USB");
|
|
//...and then shutdown em!
|
|
__io_usbstorage.shutdown();
|
|
}
|
|
|
|
int isSdInserted()
|
|
{
|
|
return __io_wiisd.isInserted();
|
|
}
|
|
|
|
int SDCard_Init()
|
|
{
|
|
//mount SD if inserted
|
|
__io_wiisd.startup();
|
|
if (!isSdInserted()){
|
|
return -1;
|
|
}
|
|
if (fatMountSimple("SD", &__io_wiisd)) {
|
|
return 1;
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
void SDCard_deInit()
|
|
{
|
|
//First unmount all the devs...
|
|
fatUnmount("SD");
|
|
//...and then shutdown em!
|
|
__io_wiisd.shutdown();
|
|
}
|