Welcome! Log In Create A New Profile


SD filesystem

Posted by g_man 
SD filesystem
April 22, 2010 12:58AM
I don't have too much experience working with the SD card on the wii, but I thought I had enough to get this to work. At the moment it wont find an existing file on the SD card. Here is my code:
int getLevels(){
		return 1;
	Level levelinfo;
FILE *fp = fopen("SD:/gravitii.lvl","rb");
if(fp != NULL){
/*Some Code*/
} else return 1;
return 0;
I know that fat is initializing because when I comment out these lines:
//if(fp != NULL){
/*Some Code*/
//} else return 1;
The function returns a 0, If they are present then fp is NULL and the code quits. Also I have double checked that the file exists and that a SD in not in the locked position
Thank you

EDIT: Running this code also fails:
DIR_ITER *root = diropen("SD:/");
        if (root)
                return true;
        return false;

Edited 1 time(s). Last edit at 04/22/2010 01:35AM by g_man.
Re: SD filesystem
April 22, 2010 02:31AM
try lowercase sd
Re: SD filesystem
April 22, 2010 02:48AM
Thanks, I hate typos
Sorry, only registered users may post in this forum.

Click here to login