Assert on start_emulating if we're left with a pending frame event

This commit is contained in:
Peter Hutterer 2022-05-04 13:27:44 +10:00
parent 5b82cb4fe8
commit 6f230edfa8
2 changed files with 4 additions and 0 deletions

View file

@ -365,6 +365,8 @@ ei_device_start_emulating(struct ei_device *device)
if (device->state != EI_DEVICE_STATE_RESUMED)
return;
assert(!device->send_frame_event);
device->state = EI_DEVICE_STATE_EMULATING;
ei_send_start_emulating(device);
}

View file

@ -325,6 +325,8 @@ eis_device_start_emulating(struct eis_device *device)
if (device->state != EIS_DEVICE_STATE_RESUMED)
return;
assert(!device->send_frame_event);
device->state = EIS_DEVICE_STATE_EMULATING;
handle_request_noargs(device, start_emulating);