ei: frame events must be sent on state emulating, not resumed

This commit is contained in:
Peter Hutterer 2022-04-29 09:41:13 +10:00
parent e25586a96c
commit e345474515
2 changed files with 4 additions and 4 deletions

View file

@ -658,7 +658,7 @@ ei_touch_up(struct ei_touch *touch)
_public_ void
ei_device_frame(struct ei_device *device)
{
if (device->state != EI_DEVICE_STATE_RESUMED)
if (device->state != EI_DEVICE_STATE_EMULATING)
return;
ei_send_frame(device);
@ -705,7 +705,7 @@ ei_device_event_stop_emulating(struct ei_device *device)
int
ei_device_event_frame(struct ei_device *device)
{
if (device->state != EI_DEVICE_STATE_RESUMED)
if (device->state != EI_DEVICE_STATE_EMULATING)
return -EINVAL;
ei_queue_frame_event(device);

View file

@ -617,7 +617,7 @@ eis_touch_up(struct eis_touch *touch)
_public_ void
eis_device_frame(struct eis_device *device)
{
if (device->state != EIS_DEVICE_STATE_RESUMED)
if (device->state != EIS_DEVICE_STATE_EMULATING)
return;
handle_request_noargs(device, frame);
@ -626,7 +626,7 @@ eis_device_frame(struct eis_device *device)
int
eis_device_event_frame(struct eis_device *device)
{
if (device->state != EIS_DEVICE_STATE_RESUMED)
if (device->state != EIS_DEVICE_STATE_EMULATING)
return -EINVAL;
eis_queue_frame_event(device);