IOS HLE: HID: Remove left-over align function
Also remove unneeded AlignUp usages.
This commit is contained in:
parent
3c50c61606
commit
22fcb735ed
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include <libusb.h>
|
||||
|
||||
#include "Common/Align.h"
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Core/Core.h"
|
||||
|
@ -373,8 +374,8 @@ void CWII_IPC_HLE_Device_hid::FillOutDevices(u32 BufferOut, u32 BufferOutSize)
|
|||
|
||||
WiiHIDDeviceDescriptor wii_device;
|
||||
ConvertDeviceToWii(&wii_device, &desc);
|
||||
Memory::CopyToEmu(OffsetBuffer, &wii_device, Align(wii_device.bLength, 4));
|
||||
OffsetBuffer += Align(wii_device.bLength, 4);
|
||||
Memory::CopyToEmu(OffsetBuffer, &wii_device, wii_device.bLength);
|
||||
OffsetBuffer += Common::AlignUp(wii_device.bLength, 4);
|
||||
bool deviceValid = true;
|
||||
bool isHID = false;
|
||||
|
||||
|
@ -387,8 +388,8 @@ void CWII_IPC_HLE_Device_hid::FillOutDevices(u32 BufferOut, u32 BufferOutSize)
|
|||
{
|
||||
WiiHIDConfigDescriptor wii_config;
|
||||
ConvertConfigToWii(&wii_config, config);
|
||||
Memory::CopyToEmu(OffsetBuffer, &wii_config, Align(wii_config.bLength, 4));
|
||||
OffsetBuffer += Align(wii_config.bLength, 4);
|
||||
Memory::CopyToEmu(OffsetBuffer, &wii_config, wii_config.bLength);
|
||||
OffsetBuffer += Common::AlignUp(wii_config.bLength, 4);
|
||||
|
||||
for (ic = 0; ic < config->bNumInterfaces; ic++)
|
||||
{
|
||||
|
@ -404,8 +405,8 @@ void CWII_IPC_HLE_Device_hid::FillOutDevices(u32 BufferOut, u32 BufferOutSize)
|
|||
|
||||
WiiHIDInterfaceDescriptor wii_interface;
|
||||
ConvertInterfaceToWii(&wii_interface, interface);
|
||||
Memory::CopyToEmu(OffsetBuffer, &wii_interface, Align(wii_interface.bLength, 4));
|
||||
OffsetBuffer += Align(wii_interface.bLength, 4);
|
||||
Memory::CopyToEmu(OffsetBuffer, &wii_interface, wii_interface.bLength);
|
||||
OffsetBuffer += Common::AlignUp(wii_interface.bLength, 4);
|
||||
|
||||
for (e = 0; e < interface->bNumEndpoints; e++)
|
||||
{
|
||||
|
@ -413,8 +414,8 @@ void CWII_IPC_HLE_Device_hid::FillOutDevices(u32 BufferOut, u32 BufferOutSize)
|
|||
|
||||
WiiHIDEndpointDescriptor wii_endpoint;
|
||||
ConvertEndpointToWii(&wii_endpoint, endpoint);
|
||||
Memory::CopyToEmu(OffsetBuffer, &wii_endpoint, Align(wii_endpoint.bLength, 4));
|
||||
OffsetBuffer += Align(wii_endpoint.bLength, 4);
|
||||
Memory::CopyToEmu(OffsetBuffer, &wii_endpoint, wii_endpoint.bLength);
|
||||
OffsetBuffer += Common::AlignUp(wii_endpoint.bLength, 4);
|
||||
|
||||
} // endpoints
|
||||
} // interfaces
|
||||
|
@ -483,11 +484,6 @@ void CWII_IPC_HLE_Device_hid::FillOutDevices(u32 BufferOut, u32 BufferOutSize)
|
|||
Memory::Write_U32(0xFFFFFFFF, OffsetBuffer); // no more devices
|
||||
}
|
||||
|
||||
int CWII_IPC_HLE_Device_hid::Align(int num, int alignment)
|
||||
{
|
||||
return (num + (alignment - 1)) & ~(alignment - 1);
|
||||
}
|
||||
|
||||
libusb_device_handle* CWII_IPC_HLE_Device_hid::GetDeviceByDevNum(u32 devNum)
|
||||
{
|
||||
libusb_device** list;
|
||||
|
|
|
@ -127,7 +127,6 @@ private:
|
|||
const libusb_interface_descriptor* src);
|
||||
void ConvertEndpointToWii(WiiHIDEndpointDescriptor* dest, const libusb_endpoint_descriptor* src);
|
||||
|
||||
int Align(int num, int alignment);
|
||||
static void checkUsbUpdates(CWII_IPC_HLE_Device_hid* hid);
|
||||
static void LIBUSB_CALL handleUsbUpdates(libusb_transfer* transfer);
|
||||
|
||||
|
|
Loading…
Reference in New Issue