mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Eliminated getPointers which are memcpyed or memset.
Removes 12 getPointers.
This commit is contained in:

committed by
Scott Mansell

parent
f65bb10c93
commit
4fb6ab40a1
@ -118,7 +118,7 @@ bool CWII_IPC_HLE_Device_di::IOCtlV(u32 _CommandAddress)
|
||||
// Read TMD to the buffer
|
||||
VolumeHandler::RAWReadToPtr(pTMD, TMDOffset, TMDsz);
|
||||
|
||||
memcpy(Memory::GetPointer(CommandBuffer.PayloadBuffer[0].m_Address), pTMD, TMDsz);
|
||||
Memory::CopyToEmu(CommandBuffer.PayloadBuffer[0].m_Address, pTMD, TMDsz);
|
||||
WII_IPC_HLE_Interface::ES_DIVerify(pTMD, TMDsz);
|
||||
|
||||
ReturnValue = 1;
|
||||
|
@ -666,11 +666,11 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
|
||||
// shouldn't matter at all. Just fill out some fields just
|
||||
// to be on the safe side.
|
||||
u32 Address = Buffer.PayloadBuffer[0].m_Address;
|
||||
memset(Memory::GetPointer(Address), 0, 0xD8);
|
||||
Memory::Memset(Address, 0, 0xD8);
|
||||
Memory::Write_U64(TitleID, Address + 4 + (0x1dc - 0x1d0)); // title ID
|
||||
Memory::Write_U16(0xffff, Address + 4 + (0x1e4 - 0x1d0)); // unnnown
|
||||
Memory::Write_U32(0xff00, Address + 4 + (0x1ec - 0x1d0)); // access mask
|
||||
memset(Memory::GetPointer(Address + 4 + (0x222 - 0x1d0)), 0xff, 0x20); // content permissions
|
||||
Memory::Memset(Address + 4 + (0x222 - 0x1d0), 0xff, 0x20); // content permissions
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -197,7 +197,7 @@ bool CWII_IPC_HLE_Device_hid::IOCtl(u32 _CommandAddress)
|
||||
|
||||
u8 * buffer = (u8*)malloc(wLength + LIBUSB_CONTROL_SETUP_SIZE);
|
||||
libusb_fill_control_setup(buffer, bmRequestType, bRequest, wValue, wIndex, wLength);
|
||||
memcpy(buffer + LIBUSB_CONTROL_SETUP_SIZE, Memory::GetPointer(data), wLength);
|
||||
Memory::CopyFromEmu(buffer + LIBUSB_CONTROL_SETUP_SIZE, data, wLength);
|
||||
libusb_fill_control_transfer(transfer, dev_handle, buffer, handleUsbUpdates, (void*)(size_t)_CommandAddress, /* no timeout */ 0);
|
||||
libusb_submit_transfer(transfer);
|
||||
|
||||
|
@ -950,8 +950,8 @@ bool CWII_IPC_HLE_Device_net_ip_top::IOCtl(u32 _CommandAddress)
|
||||
Memory::Read_U8(BufferIn + 8 + 3)
|
||||
);
|
||||
INFO_LOG(WII_IPC_NET, "IOCTL_SO_INETNTOP %s", ip_s);
|
||||
memset(Memory::GetPointer(BufferOut), 0, BufferOutSize);
|
||||
memcpy(Memory::GetPointer(BufferOut), ip_s, strlen(ip_s));
|
||||
Memory::Memset(BufferOut, 0, BufferOutSize);
|
||||
Memory::CopyToEmu(BufferOut, (u8*)ip_s, strlen(ip_s));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1436,7 +1436,7 @@ bool CWII_IPC_HLE_Device_net_ip_top::IOCtlV(u32 CommandAddress)
|
||||
s32 icmp_length = sizeof(data);
|
||||
|
||||
if (BufferInSize2 == sizeof(data))
|
||||
memcpy(data, Memory::GetPointer(_BufferIn2), BufferInSize2);
|
||||
Memory::CopyFromEmu(data, _BufferIn2, BufferInSize2);
|
||||
else
|
||||
{
|
||||
// TODO sequence number is incremented either statically, by
|
||||
|
@ -123,7 +123,7 @@ private:
|
||||
|
||||
inline void FillBuffer(const void* src, const size_t size) const
|
||||
{
|
||||
memcpy(Memory::GetPointer(m_buffer), src, size);
|
||||
Memory::CopyToEmu(m_buffer, (u8*)src, size);
|
||||
}
|
||||
|
||||
inline void SetRetVal(const u32 retval) const
|
||||
|
Reference in New Issue
Block a user