#158978 - cornaljoe - Mon Jun 23, 2008 5:37 pm
I used fatMountCustomInterface to load a device to 'fat3:/'. Is it possible to switch this to the default device on 'fat:/' or 'fat0:/'?
Last edited by cornaljoe on Wed Jun 25, 2008 2:23 pm; edited 1 time in total
#159037 - hacker013 - Tue Jun 24, 2008 6:56 pm
mayby is it an idea to reset libfat and than use fatInitDefault(); or something like that??
_________________
Website / Blog
Let the nds be with you.
#159099 - thedopefish - Wed Jun 25, 2008 1:41 pm
Seems like this function would be useful, from fat.h:
Code: |
/*
Set the default device for access by fat: and fat0:
PD_DEFAULT is unallowed.
Doesn't do anything useful on GBA, since there is only one device
*/
bool fatSetDefaultInterface (PARTITION_INTERFACE partitionNumber); |
_________________
#include <sig.h>
#159100 - cornaljoe - Wed Jun 25, 2008 1:56 pm
I tried it but there is no documents explaining it's use. In my code this seems to cause nothing:
Code: |
fatSetDefaultInterface(PI_CUSTOM); |
I'm probably using this wrong.
#159102 - cornaljoe - Wed Jun 25, 2008 2:34 pm
Ok, I found my problem I had the right code already. I just needed to place a WaitForVBlank.
Man almost all of the problems I run into are solved with this code. Thank for the help guys.
#159511 - chishm - Wed Jul 02, 2008 4:03 am
cornaljoe wrote: |
I used fatMountCustomInterface to load a device to 'fat3:/'. Is it possible to switch this to the default device on 'fat:/' or 'fat0:/'? |
For future reference, chdir ("fat3:/") should do what you want.
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com
#159517 - cornaljoe - Wed Jul 02, 2008 5:45 am
Ok, thanks I'll put that into consideration when re-writing my browsing code. I actually never used it. I stored the current dir as a string and used dirnext to iterate through it. I basically learned all I could from examples and my way worked. When I discovered chdir I found it unnecessary and never learned how to use it.