mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 08:35:34 +00:00
Trying to track down NullPointerException in USB input thread
This commit is contained in:
parent
4d771c598a
commit
e4c9806f4f
|
@ -276,7 +276,16 @@ class HIDDeviceUSB implements HIDDevice {
|
|||
int packetSize = mInputEndpoint.getMaxPacketSize();
|
||||
byte[] packet = new byte[packetSize];
|
||||
while (mRunning) {
|
||||
int r = mConnection.bulkTransfer(mInputEndpoint, packet, packetSize, 1000);
|
||||
int r;
|
||||
try
|
||||
{
|
||||
r = mConnection.bulkTransfer(mInputEndpoint, packet, packetSize, 1000);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.v(TAG, "Exception in UsbDeviceConnection bulktransfer: " + e);
|
||||
break;
|
||||
}
|
||||
if (r < 0) {
|
||||
// Could be a timeout or an I/O error
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue