mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-19 19:20:54 +00:00
some more error logging goodness in wii sd
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3023 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
8ef66cac92
commit
daac0d8ca1
@ -208,6 +208,8 @@ u32 CWII_IPC_HLE_Device_sdio_slot0::ExecuteCommand(u32 _BufferIn, u32 _BufferInS
|
|||||||
req.isDMA = Memory::Read_U32(_BufferIn + 28);
|
req.isDMA = Memory::Read_U32(_BufferIn + 28);
|
||||||
req.pad0 = Memory::Read_U32(_BufferIn + 32);
|
req.pad0 = Memory::Read_U32(_BufferIn + 32);
|
||||||
|
|
||||||
|
u32 success = 0;
|
||||||
|
|
||||||
switch (req.command)
|
switch (req.command)
|
||||||
{
|
{
|
||||||
case SELECT_CARD:
|
case SELECT_CARD:
|
||||||
@ -237,7 +239,8 @@ u32 CWII_IPC_HLE_Device_sdio_slot0::ExecuteCommand(u32 _BufferIn, u32 _BufferInS
|
|||||||
{
|
{
|
||||||
u32 size = req.bsize * req.blocks;
|
u32 size = req.bsize * req.blocks;
|
||||||
|
|
||||||
fseek(m_Card, req.arg, SEEK_SET);
|
if (fseek(m_Card, req.arg, SEEK_SET) != 0)
|
||||||
|
ERROR_LOG(WII_IPC_SD, "fseek failed WTF");
|
||||||
|
|
||||||
u8* buffer = new u8[size];
|
u8* buffer = new u8[size];
|
||||||
|
|
||||||
@ -250,14 +253,15 @@ u32 CWII_IPC_HLE_Device_sdio_slot0::ExecuteCommand(u32 _BufferIn, u32 _BufferInS
|
|||||||
Memory::Write_U8((u8)buffer[i], req.addr++);
|
Memory::Write_U8((u8)buffer[i], req.addr++);
|
||||||
}
|
}
|
||||||
DEBUG_LOG(WII_IPC_SD, "outbuffer size %i wrote %i", _BufferOutSize, i);
|
DEBUG_LOG(WII_IPC_SD, "outbuffer size %i wrote %i", _BufferOutSize, i);
|
||||||
return 1;
|
success = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ERROR_LOG(WII_IPC_SD, "Read Failed %x", nRead);
|
ERROR_LOG(WII_IPC_SD, "Read Failed - read %x, error %i, eof? %i",
|
||||||
|
nRead, ferror(m_Card), feof(m_Card));
|
||||||
}
|
}
|
||||||
|
|
||||||
delete buffer;
|
delete [] buffer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -267,5 +271,5 @@ u32 CWII_IPC_HLE_Device_sdio_slot0::ExecuteCommand(u32 _BufferIn, u32 _BufferInS
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return success;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user