From d55c5f8742564a87f497a33324d12c873efa60c6 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Wed, 25 Sep 2024 01:32:10 +0200 Subject: [PATCH] Make sure IRECV_DEVICE_REMOVE event has the mode set the device was in --- src/libirecovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libirecovery.c b/src/libirecovery.c index e25eb7d..ddc1946 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c @@ -2515,7 +2515,7 @@ static void _irecv_handle_device_remove(struct irecv_usb_device_info *devinfo) { irecv_device_event_t dev_event; dev_event.type = IRECV_DEVICE_REMOVE; - dev_event.mode = 0; + dev_event.mode = devinfo->mode; dev_event.device_info = &(devinfo->device_info); mutex_lock(&listener_mutex); FOREACH(struct irecv_device_event_context* context, &listeners) {