mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-22 09:59:18 +01:00
Avoid using DSi SD interface in NDS mode
This commit is contained in:
parent
78ca2bd297
commit
b7450524b1
@ -86,10 +86,11 @@ const INTERFACE_ID _FAT_disc_interfaces[] = {
|
|||||||
|
|
||||||
/* ====================== NDS ====================== */
|
/* ====================== NDS ====================== */
|
||||||
#elif defined (NDS)
|
#elif defined (NDS)
|
||||||
|
#include <nds/system.h>
|
||||||
#include <nds/arm9/dldi.h>
|
#include <nds/arm9/dldi.h>
|
||||||
|
|
||||||
static const DISC_INTERFACE* get_io_dsisd (void) {
|
static const DISC_INTERFACE* get_io_dsisd (void) {
|
||||||
return &__io_dsisd;
|
return isDSiMode() ? &__io_dsisd : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const INTERFACE_ID _FAT_disc_interfaces[] = {
|
const INTERFACE_ID _FAT_disc_interfaces[] = {
|
||||||
|
@ -154,6 +154,9 @@ bool fatInit (uint32_t cacheSize, bool setAsDefaultDevice) {
|
|||||||
i++)
|
i++)
|
||||||
{
|
{
|
||||||
disc = _FAT_disc_interfaces[i].getInterface();
|
disc = _FAT_disc_interfaces[i].getInterface();
|
||||||
|
if (!disc) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (fatMount (_FAT_disc_interfaces[i].name, disc, 0, cacheSize, DEFAULT_SECTORS_PAGE)) {
|
if (fatMount (_FAT_disc_interfaces[i].name, disc, 0, cacheSize, DEFAULT_SECTORS_PAGE)) {
|
||||||
// The first device to successfully mount is set as the default
|
// The first device to successfully mount is set as the default
|
||||||
if (defaultDevice < 0) {
|
if (defaultDevice < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user