diff --git a/source/devicemounter/DeviceHandler.cpp b/source/devicemounter/DeviceHandler.cpp index c11cadd9..4160d86f 100644 --- a/source/devicemounter/DeviceHandler.cpp +++ b/source/devicemounter/DeviceHandler.cpp @@ -29,13 +29,13 @@ #include #include #include - +#include +#include "cios.hpp" #include "DeviceHandler.hpp" #include "wbfs.h" #include "usbstorage.h" #ifdef DOLPHIN -#include const DISC_INTERFACE __io_sdhc = __io_wiisd; #else extern const DISC_INTERFACE __io_sdhc; @@ -133,7 +133,10 @@ bool DeviceHandler::MountSD() { if(!sd) { - sd = new PartitionHandle(&__io_sdhc); + if(cIOSInfo::neek2o()) + sd = new PartitionHandle(&__io_wiisd); + else + sd = new PartitionHandle(&__io_sdhc); if(sd->GetPartitionCount() < 1) { delete sd; diff --git a/source/devicemounter/PartitionHandle.cpp b/source/devicemounter/PartitionHandle.cpp index cf823b75..e8c7c9c3 100644 --- a/source/devicemounter/PartitionHandle.cpp +++ b/source/devicemounter/PartitionHandle.cpp @@ -29,7 +29,7 @@ #include #include #include - +#include "cios.hpp" #include "PartitionHandle.h" #include "utils.h" #include "ntfs.h" @@ -37,8 +37,9 @@ #include "ext2.h" #include "wbfs.h" #include -#ifdef DOLPHIN #include + +#ifdef DOLPHIN const DISC_INTERFACE __io_sdhc = __io_wiisd; #else extern const DISC_INTERFACE __io_sdhc; @@ -142,9 +143,9 @@ bool PartitionHandle::Mount(int pos, const char * name) } else if(strncmp(GetFSName(pos), "WBFS", 4) == 0) { - if (interface == &__io_usbstorage) + if(interface == &__io_usbstorage) SetWbfsHandle(pos, wbfs_open_partition(__WBFS_ReadUSB, __WBFS_WriteUSB, NULL, sector_size, GetSecCount(pos), GetLBAStart(pos), 0)); - else if (interface == &__io_sdhc) + else if((cIOSInfo::neek2o() && interface == &__io_wiisd) || (!cIOSInfo::neek2o() && interface == &__io_sdhc)) SetWbfsHandle(pos, wbfs_open_partition(__WBFS_ReadSDHC, __WBFS_WriteSDHC, NULL, sector_size, GetSecCount(pos), GetLBAStart(pos), 0)); if(GetWbfsHandle(pos)) return true;