Avoid using DSi SD interface in NDS mode

This commit is contained in:
fincs 2017-01-15 13:33:28 +01:00 committed by Dave Murphy
parent 78ca2bd297
commit b7450524b1
2 changed files with 5 additions and 1 deletions

View File

@ -86,10 +86,11 @@ const INTERFACE_ID _FAT_disc_interfaces[] = {
/* ====================== NDS ====================== */
#elif defined (NDS)
#include <nds/system.h>
#include <nds/arm9/dldi.h>
static const DISC_INTERFACE* get_io_dsisd (void) {
return &__io_dsisd;
return isDSiMode() ? &__io_dsisd : NULL;
}
const INTERFACE_ID _FAT_disc_interfaces[] = {

View File

@ -154,6 +154,9 @@ bool fatInit (uint32_t cacheSize, bool setAsDefaultDevice) {
i++)
{
disc = _FAT_disc_interfaces[i].getInterface();
if (!disc) {
continue;
}
if (fatMount (_FAT_disc_interfaces[i].name, disc, 0, cacheSize, DEFAULT_SECTORS_PAGE)) {
// The first device to successfully mount is set as the default
if (defaultDevice < 0) {