Fix incorrect byte order when writing 3byte data to BBA_WRTXFIFOD

This commit is contained in:
container1234 2016-10-13 23:33:17 +09:00
parent 5541237b74
commit 5716d2bc0e
1 changed files with 2 additions and 0 deletions

View File

@ -345,6 +345,8 @@ void CEXIETHERNET::MXCommandHandler(u32 data, u32 size)
case BBA_WRTXFIFOD:
if (size == 2)
data = Common::swap16(data & 0xffff);
else if (size == 3)
data = Common::swap32(data & 0xffffff) >> 8;
else if (size == 4)
data = Common::swap32(data);
DirectFIFOWrite((u8*)&data, size);