Talk:Libfat: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
'USB_OpenDevice' works well on its own, but whenever I use 'fatInitDefault' (or 'fatInit') somewhere, all calls to 'USB_OpenDevice' after that fail. I am using the latest version of libogc and devkitpro. Anyone know what's wrong? --[[User:PunMaster|PunMaster]] 18:45, 27 December 2008 (UTC) | 'USB_OpenDevice' works well on its own, but whenever I use 'fatInitDefault' (or 'fatInit') somewhere, all calls to 'USB_OpenDevice' after that fail. I am using the latest version of libogc and devkitpro. Anyone know what's wrong? --[[User:PunMaster|PunMaster]] 18:45, 27 December 2008 (UTC) | ||
: Yes, that's a known bug. If possible do your libfat initialization after your other USB calls. --[[User:Tantric|Tantric]] 21:46, 27 December 2008 (UTC) | : Yes, that's a known bug. If possible do your libfat initialization after your other USB calls. --[[User:Tantric|Tantric]] 21:46, 27 December 2008 (UTC) | ||
:: I've put together the following code, which will mount the SD card without touching USB. If all you need to access is the SD card, this code can be used in place of 'fatInit' (while preserving USB functionality). After that, just access files as 'sd:/...'. --[[User:PunMaster|PunMaster]] 04:10, 28 December 2008 (UTC) | |||
<source lang="c"> | |||
#include <sdcard/wiisd_io.h> | |||
#include <fat.h> | |||
// ... | |||
void SDCard_Init() | |||
{ | |||
__io_wiisd.startup(); | |||
fatMountSimple("sd", &__io_wiisd); | |||
} | |||
</source> | |||
Revision as of 05:10, 28 December 2008
'fatInitDefault' and 'USB_OpenDevice' Not Playing Well Together
'USB_OpenDevice' works well on its own, but whenever I use 'fatInitDefault' (or 'fatInit') somewhere, all calls to 'USB_OpenDevice' after that fail. I am using the latest version of libogc and devkitpro. Anyone know what's wrong? --PunMaster 18:45, 27 December 2008 (UTC)
- Yes, that's a known bug. If possible do your libfat initialization after your other USB calls. --Tantric 21:46, 27 December 2008 (UTC)
- I've put together the following code, which will mount the SD card without touching USB. If all you need to access is the SD card, this code can be used in place of 'fatInit' (while preserving USB functionality). After that, just access files as 'sd:/...'. --PunMaster 04:10, 28 December 2008 (UTC)
#include <sdcard/wiisd_io.h>
#include <fat.h>
// ...
void SDCard_Init()
{
__io_wiisd.startup();
fatMountSimple("sd", &__io_wiisd);
}