mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-06-11 18:38:07 +00:00
fpi-image-device: Reorder image state not to change values
We need this to avoid breaking already present TOD image devices drivers.
This commit is contained in:
@@ -208,8 +208,12 @@ recv_image (FpDeviceVirtualImage *self, GInputStream *stream)
|
|||||||
g_debug ("Starting image receive (if active), state is: %i", state);
|
g_debug ("Starting image receive (if active), state is: %i", state);
|
||||||
|
|
||||||
/* Only register if the state is active. */
|
/* Only register if the state is active. */
|
||||||
if (state >= FPI_IMAGE_DEVICE_STATE_IDLE)
|
switch (state)
|
||||||
{
|
{
|
||||||
|
case FPI_IMAGE_DEVICE_STATE_IDLE:
|
||||||
|
case FPI_IMAGE_DEVICE_STATE_AWAIT_FINGER_ON:
|
||||||
|
case FPI_IMAGE_DEVICE_STATE_CAPTURE:
|
||||||
|
case FPI_IMAGE_DEVICE_STATE_AWAIT_FINGER_OFF:
|
||||||
g_input_stream_read_all_async (stream,
|
g_input_stream_read_all_async (stream,
|
||||||
self->recv_img_hdr,
|
self->recv_img_hdr,
|
||||||
sizeof (self->recv_img_hdr),
|
sizeof (self->recv_img_hdr),
|
||||||
@@ -217,6 +221,10 @@ recv_image (FpDeviceVirtualImage *self, GInputStream *stream)
|
|||||||
self->cancellable,
|
self->cancellable,
|
||||||
recv_image_hdr_recv_cb,
|
recv_image_hdr_recv_cb,
|
||||||
self);
|
self);
|
||||||
|
/* fallthrough */
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,12 +62,12 @@
|
|||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
FPI_IMAGE_DEVICE_STATE_INACTIVE,
|
FPI_IMAGE_DEVICE_STATE_INACTIVE,
|
||||||
FPI_IMAGE_DEVICE_STATE_ACTIVATING,
|
|
||||||
FPI_IMAGE_DEVICE_STATE_DEACTIVATING,
|
|
||||||
FPI_IMAGE_DEVICE_STATE_IDLE,
|
|
||||||
FPI_IMAGE_DEVICE_STATE_AWAIT_FINGER_ON,
|
FPI_IMAGE_DEVICE_STATE_AWAIT_FINGER_ON,
|
||||||
FPI_IMAGE_DEVICE_STATE_CAPTURE,
|
FPI_IMAGE_DEVICE_STATE_CAPTURE,
|
||||||
FPI_IMAGE_DEVICE_STATE_AWAIT_FINGER_OFF,
|
FPI_IMAGE_DEVICE_STATE_AWAIT_FINGER_OFF,
|
||||||
|
FPI_IMAGE_DEVICE_STATE_ACTIVATING,
|
||||||
|
FPI_IMAGE_DEVICE_STATE_DEACTIVATING,
|
||||||
|
FPI_IMAGE_DEVICE_STATE_IDLE,
|
||||||
} FpiImageDeviceState;
|
} FpiImageDeviceState;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user