python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / misc / drivers / xboxdrv / fix-60-sec-delay.patch
blobda543d2cfa01b9f3f8953794ac77468b3d8eab65
1 From 7326421eeaadbc2aeb3828628c2e65bb7be323a9 Mon Sep 17 00:00:00 2001
2 From: buxit <buti@bux.at>
3 Date: Wed, 2 Nov 2016 16:25:14 +0100
4 Subject: [PATCH] fix 60 seconds delay
6 use `libusb_handle_events_timeout_completed()` instead of `libusb_handle_events()`
7 should fix #144
8 ---
9 src/usb_gsource.cpp | 5 ++++-
10 1 file changed, 4 insertions(+), 1 deletion(-)
12 diff --git a/src/usb_gsource.cpp b/src/usb_gsource.cpp
13 index 00bf1315..afb38f65 100644
14 --- a/src/usb_gsource.cpp
15 +++ b/src/usb_gsource.cpp
16 @@ -174,7 +174,10 @@ USBGSource::on_source_dispatch(GSource* source, GSourceFunc callback, gpointer u
17 gboolean
18 USBGSource::on_source()
20 - libusb_handle_events(NULL);
21 + struct timeval to;
22 + to.tv_sec = 0;
23 + to.tv_usec = 0;
24 + libusb_handle_events_timeout_completed(NULL, &to, NULL);
25 return TRUE;