@@ -23,17 +23,10 @@ void FLinuxDeviceInfo::Read(FDeviceContext* Context)
23
23
if (Context->ConnectionType == Bluetooth && Context->DeviceType == EDeviceType::DualShock4)
24
24
{
25
25
const size_t InputReportLength = 547 ;
26
- if (sizeof (Context->BufferDS4 ) < InputReportLength)
27
- {
28
- UE_LOG (LogTemp, Error, TEXT (" BufferDS4 é muito pequeno para o relatório de input." ));
29
- InvalidateHandle (Context);
30
- return ;
31
- }
32
-
33
26
BytesRead = hid_read (Context->Handle , Context->BufferDS4 , InputReportLength);
34
27
if (BytesRead < 0 )
35
28
{
36
- UE_LOG (LogTemp, Warning, TEXT (" Failed to read from device (likely disconnected): %ls " ), hid_error (Context-> Handle ));
29
+ UE_LOG (LogTemp, Warning, TEXT (" Failed to read from device (likely disconnected)" ));
37
30
InvalidateHandle (Context);
38
31
}
39
32
return ;
@@ -50,7 +43,7 @@ void FLinuxDeviceInfo::Read(FDeviceContext* Context)
50
43
BytesRead = hid_read (Context->Handle , Context->Buffer , InputReportLength);
51
44
if (BytesRead < 0 )
52
45
{
53
- UE_LOG (LogTemp, Warning, TEXT (" Failed to read from device (likely disconnected): %ls " ), hid_error (Context-> Handle ));
46
+ UE_LOG (LogTemp, Warning, TEXT (" Failed to read from device (likely disconnected)" ));
54
47
InvalidateHandle (Context);
55
48
}
56
49
}
@@ -68,7 +61,7 @@ void FLinuxDeviceInfo::Write(FDeviceContext* Context)
68
61
int BytesWritten = hid_write (Context->Handle , Context->BufferOutput , OutputReportLength);
69
62
if (BytesWritten < 0 )
70
63
{
71
- UE_LOG (LogTemp, Error, TEXT (" Failed to write to device: %ls " ), hid_error (Context-> Handle ));
64
+ UE_LOG (LogTemp, Error, TEXT (" Failed to write to device" ));
72
65
InvalidateHandle (Context);
73
66
}
74
67
}
@@ -142,7 +135,7 @@ bool FLinuxDeviceInfo::CreateHandle(FDeviceContext* Context)
142
135
143
136
if (Handle == INVALID_PLATFORM_HANDLE)
144
137
{
145
- UE_LOG (LogTemp, Error, TEXT (" HIDManager: Failed to open device handle for the DualSense." ), *Context-> Path , hid_error (Handle) );
138
+ UE_LOG (LogTemp, Error, TEXT (" HIDManager: Failed to open device handle for the DualSense." ));
146
139
return false ;
147
140
}
148
141
0 commit comments